I want to extract the text in the pdf as well as tables present in the PDF. I am currently using PDFBox 2.0.6 and traprange. The problem with traprange is, it extracts table if the page has only table data. Otherwise it writes line-by line in the csv cell. Is there anyway to extract table data as is in the csv file. I have a sample pdf file which looks Here I want to extract Column1 Column2 and Column3 data in the csv file. However, the columns are not fixed for every PDF.