You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2015/09/25 12:08:04 UTC

[jira] [Commented] (PDFBOX-2991) Improper word concatenation when extracting pdf

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

Andreas Lehmkühler commented on PDFBOX-2991:
--------------------------------------------

The given pdf uses different font sizes, so that it is difficut to determnine which parts belong to the line and which not.

PDFBox assumes that 
- "Orange County, CA" is on the same line than "Ben McCann" 
- "benmccann@gmail.com" is on the same line than "Ben McCann" 
- that leads to "Orange County, CA" is on the same line than "benmccann@gmail.com" 

Saying that, I don't how what a correct result may look like.

> Improper word concatenation when extracting pdf
> -----------------------------------------------
>
>                 Key: PDFBOX-2991
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2991
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Ben McCann
>         Attachments: sample-resume.pdf
>
>
> The code below will output text for a pdf. Words that are on different lines are concatenated together
>     PDDocument pdDoc = PDDocument.load(new File("sample-resume.pdf"));
>     StringWriter writer = new StringWriter();
>     new PDFTextStripper().writeText(pdDoc, writer);
>     pdDoc.close();
>     System.out.println(writer.toString());



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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