Zaid Amir created PDFBOX-3562:
---------------------------------
Summary: PDFBox hangs indefinately when rendering certain files
Key: PDFBOX-3562
URL: https://issues.apache.org/jira/browse/PDFBOX-3562
Project: PDFBox
Issue Type: Bug
Components: Rendering
Affects Versions: 2.0.3
Environment: Ubuntu 14.04, Oracle Java SE 1.8
Reporter: Zaid Amir
There seems to be an issue with PDFBox when rendering certain PDF files, when
calling renderImageWithDPI; the call seems to hang indefinitely.
I noticed this issue on this file:[
https://1drv.ms/b/s!Av-Yk52R4YupvcUEZFueSnXFh6_pXw]
Here is the call to renderImageWithDPI:
{quote}
PDDocument doc = PDDocument.load(file);
PDFRenderer renderer = new PDFRenderer(doc);
BufferedImage img = renderer.renderImageWithDPI(0, 300.0f, ImageType.RGB);
{quote}
checking the stack trace using jstack gives me the following:
{quote}
"pool-3-thread-1" #14 prio=5 os_prio=0 tid=0x00007f0bd41d2000 nid=0x76d4
runnable [0x00007f0bb44db000]
java.lang.Thread.State: RUNNABLE
at org.apache.log4j.Category.getEffectiveLevel(Category.java:442)
at org.apache.log4j.Category.log(Category.java:855)
at org.slf4j.impl.Log4jLoggerAdapter.log(Log4jLoggerAdapter.java:595)
at
org.apache.commons.logging.impl.SLF4JLocationAwareLog.warn(SLF4JLocationAwareLog.java:179)
at
org.apache.pdfbox.pdmodel.graphics.shading.Type4ShadingContext.collectTriangles(Type4ShadingContext.java:152)
at
org.apache.pdfbox.pdmodel.graphics.shading.Type4ShadingContext.<init>(Type4ShadingContext.java:64)
at
org.apache.pdfbox.pdmodel.graphics.shading.Type4ShadingPaint.createContext(Type4ShadingPaint.java:66)
at sun.java2d.pipe.AlphaPaintPipe.startSequence(AlphaPaintPipe.java:84)
at sun.java2d.pipe.AAShapePipe.renderTiles(AAShapePipe.java:168)
at sun.java2d.pipe.AAShapePipe.renderPath(AAShapePipe.java:159)
at sun.java2d.pipe.AAShapePipe.fill(AAShapePipe.java:68)
at
sun.java2d.pipe.PixelToParallelogramConverter.fill(PixelToParallelogramConverter.java:164)
at sun.java2d.pipe.ValidatePipe.fill(ValidatePipe.java:160)
at sun.java2d.SunGraphics2D.fill(SunGraphics2D.java:2527)
at
org.apache.pdfbox.rendering.PageDrawer.shadingFill(PageDrawer.java:933)
at
org.apache.pdfbox.contentstream.operator.graphics.ShadingFill.process(ShadingFill.java:41)
at
org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:815)
at
org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:472)
at
org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:446)
at
org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149)
at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:189)
at
org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:145)
at
org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:94)
at
com.documentconverter.PDFManager_Box.GetThumbPDF(PDFManager_Box.java:58)
{quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]