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.

Reply via email to