Description
Whenever a pdf is printed java uses a 2-pass-algo to create each page. The first pass using sun.print.PeekGraphics works fine, but during the second pass using sun.print.PSPathGraphics an exception occurs if the pdf includes an image.
java.lang.NullPointerException
at java.awt.geom.Area.<init>(Area.java:108)
at sun.print.PSPathGraphics.drawImageToPlatform(PSPathGraphics.java:560)
at sun.print.PathGraphics.drawImage(PathGraphics.java:1701)
at org.apache.pdfbox.util.operator.pagedrawer.Invoke.process(Invoke.java:121)
at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:516)
at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:229)
at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:188)
at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:99)
at org.apache.pdfbox.pdmodel.PDPage.print(PDPage.java:795)
at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1964)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1431)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1247)
at org.apache.pdfbox.pdmodel.PDDocument.print(PDDocument.java:1003)