[
https://issues.apache.org/jira/browse/PDFBOX-6364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18154741#comment-18154741
]
Tilman Hausherr commented on PDFBOX-6364:
-----------------------------------------
Please ask your AI for a useful maximum value and for a patch. I'm going for a
fixed non configurable value like done in PDFBOX-6362. This is not a realistic
problem.
> Text extraction checks every article bead for every glyph, so a small PDF can
> keep it busy for hours
> -----------------------------------------------------------------------------------------------------
>
> Key: PDFBOX-6364
> URL: https://issues.apache.org/jira/browse/PDFBOX-6364
> Project: PDFBox
> Issue Type: Bug
> Reporter: Simon Steiner
> Priority: Major
>
> With the default shouldSeparateByBeads=true, PDFTextStripper.processPage
> loads every entry of the page's /B (article bead) array with no limit. Then,
> for every glyph, processTextPosition loops over all of those beads,
> rebuilding each bead's PDRectangle from its /R entry and testing whether it
> contains the glyph. The work per page is glyphs × beads, and the document
> sets both numbers. A compressed PDF can repeat one bead reference very many
> times and show very many glyphs. Separately, a bead with no /R makes
> getRectangle() return null, and the unchecked rect.contains() throws
> NullPointerException, which aborts extraction of the whole document.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]