Simon Steiner created PDFBOX-6364:
-------------------------------------

             Summary: 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


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]

Reply via email to