You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Maruan Sahyoun (JIRA)" <ji...@apache.org> on 2017/03/02 16:51:45 UTC
[jira] [Commented] (PDFBOX-3706) Article separation with
PDFTextStripper
[ https://issues.apache.org/jira/browse/PDFBOX-3706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15892593#comment-15892593 ]
Maruan Sahyoun commented on PDFBOX-3706:
----------------------------------------
[~spellsleeper] There are no article beads in the PDF so the whole text is treated as belonging to the same article. Please take a look at [^text-paragraphs-simple-beads.pdf] which is a modified version of the sample with article beads added.
> Article separation with PDFTextStripper
> ---------------------------------------
>
> Key: PDFBOX-3706
> URL: https://issues.apache.org/jira/browse/PDFBOX-3706
> Project: PDFBox
> Issue Type: Improvement
> Components: Text extraction
> Affects Versions: 2.0.4
> Environment: Java 1.7, Windows 10 x64,
> Reporter: Daniel Ritter
> Attachments: text-paragraphs-simple-beads.pdf, text-paragraphs-simple.pdf
>
>
> I found no solution in PDFTextStripper which realy separates text articles with the method setArticleStart or setArticleEnd. Currently it seems the article start is always after the page start and the article end is always before the page end.
> When I extract the content of the atachment as xml with article tags i get the following:
> <article>
> <paragraph>
> Einfacher Textinhalt - nicht eingerückt
> Einfacher Textinhalt - nicht eingerückt
> Einfacher Textinhalt - nicht eingerückt
> </paragraph>
> <paragraph>
> Einfacher Textinhalt - 1* eingerückt
> Einfacher Textinhalt - 1* eingerückt
> Einfacher Textinhalt - 1* eingerückt
> </paragraph>
> <paragraph>
> Einfacher Textinhalt - 2* eingerückt
> Einfacher Textinhalt - 2* eingerückt
> Einfacher Textinhalt - 2* eingerückt
> </paragraph>
> <paragraph>
> Einfacher Textinhalt - nicht eingerückt
> Einfacher Textinhalt - nicht eingerückt
> Einfacher Textinhalt - nicht eingerückt
> </paragraph>
> <paragraph>
> Einfacher Textinhalt - 2* eingerückt
> Einfacher Textinhalt - 2* eingerückt
> Einfacher Textinhalt - 2* eingerückt
> </paragraph>
> </article>
> I would expect:
> <article>
> <paragraph>
> Einfacher Textinhalt - nicht eingerückt
> Einfacher Textinhalt - nicht eingerückt
> Einfacher Textinhalt - nicht eingerückt
> </paragraph>
> <paragraph>
> Einfacher Textinhalt - 1* eingerückt
> Einfacher Textinhalt - 1* eingerückt
> Einfacher Textinhalt - 1* eingerückt
> </paragraph>
> <paragraph>
> Einfacher Textinhalt - 2* eingerückt
> Einfacher Textinhalt - 2* eingerückt
> Einfacher Textinhalt - 2* eingerückt
> </paragraph>
> </article>
> <article>
> <paragraph>
> Einfacher Textinhalt - nicht eingerückt
> Einfacher Textinhalt - nicht eingerückt
> Einfacher Textinhalt - nicht eingerückt
> </paragraph>
> </article>
> <article>
> <paragraph>
> Einfacher Textinhalt - 2* eingerückt
> Einfacher Textinhalt - 2* eingerückt
> Einfacher Textinhalt - 2* eingerückt
> </paragraph>
> </article>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org