You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Rens Huizenga (JIRA)" <ji...@apache.org> on 2018/09/10 07:27:00 UTC

[jira] [Commented] (PDFBOX-4293) PDFBox does not align "columns" properly

    [ https://issues.apache.org/jira/browse/PDFBOX-4293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16608818#comment-16608818 ] 

Rens Huizenga commented on PDFBOX-4293:
---------------------------------------

Hi Tilman,

Well, although I recognise what you mention about proportional fonts I can't agree it isn't possible. I found a product named A-PDF. They offer three types of PDF to text conversion with a free product and one of these options does what I was looking for, it fills blank areas with spaces. I think another good method could be to insert a tab character instead of spaces. That would eliminate the math needed to fill blank areas with spaces where a proportional font is used.  So, I think, when an option was added to Tika to replace x spaces with a tab character the problem would probably be solved. Can you agree yhat could be a solution?

Kind regards,
Rens Huizenga



> PDFBox does not align "columns" properly
> ----------------------------------------
>
>                 Key: PDFBOX-4293
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4293
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Text extraction
>    Affects Versions: 2.0.11
>         Environment: Windows 7 64 
>            Reporter: Rens Huizenga
>            Priority: Blocker
>         Attachments: PDFconversieTekst CONVERTIO.txt, PDFconversieTekst.pdf, PDFconversieTekst.pdf.txt, PDFconversieTekst.xlsx
>
>
>  I have to convert Pdf's to database data. I developed a parser that reads .txt files. The original data is available in PDFs only . Therefore .txt files will have to be created by Tika converting the PDF's to .txt. After conversion I recognise an alignment issue with the .txt data compared to the  columns in the PDF. On the TIKA website I read that I need to check if the problems also occurs in PDFBox, so I checked for that. PDFBox has the same issue.
> These lines of PDF data:
> a  b  c  d  e   
> a  b  c  d      e
> are both presented as
> a  b  c  d  e
> in the text file, causing for example numbers to be presented in the wrong "column".
> Unfortunately I cannot share busniess documents, but i have created an example in Excel, saved it as PDF and converted it to .txt. See attachments.
> In addition I converted the testset online with Convertio.co. Their results is as expected, with enough spaces between the words/numbers to recognise the column.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org