pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex <alexa...@gmail.com>
Subject Slowness in PDFRenderer.renderImageWithDPI()
Date Mon, 30 Jul 2018 18:01:02 GMT

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

Any advice welcome. Thanks.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message