Hi,

The page renders in 27 seconds with energy settings set to minimal, and 11 seconds when set to max performance. This is slow, but I've seen worse. Have you done what is explained on
https://pdfbox.apache.org/2.0/getting-started.html ?

The page contains over 1000 tiny images. This is extremely inefficient, and maybe done to avoid people grabbing the image.

Tilman

Am 30.07.2018 um 20:01 schrieb Alex:
Hi,

I use PDFBox's PDFRenderer to render PDF pages into BufferedImages. It handles 
most PDFs well, but I've come across one that causes it to struggle. I first 
noticed this in an earlier 2.0.x version, but it still happens in 2.0.11:

File file = new File("A334vu0TFjpSVeK4_NgZNw")
PDDocument doc = PDDocument.load(file);
PDFRenderer renderer = new PDFRenderer(doc);
PDFRenderer.renderImageWithDPI(0, 50f);

The call to renderImageWithDPI() uses 100% CPU and never completes (at least 
not within 30 minutes). But only on page 0. The other pages do render.

The file is hosted here for the time being (4.2 MB): 
https://s3.us-east-2.amazonaws.com/alexd-pdfbox-sscce/A334vu0TFjpSVeK4_NgZNw 
<https://s3.us-east-2.amazonaws.com/alexd-pdfbox-sscce/A334vu0TFjpSVeK4_NgZNw>

Any advice welcome. Thanks.




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to