You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by "Fratila, Johnny" <Jo...@ctsinc.biz> on 2011/10/31 18:14:37 UTC

Infinite loop trying to print PDF?

I have a PDF that uses a rasterized font on page 2.  When trying to print it using PDFBox it seems to be stuck in an infinite loop.  I set a breakpoint at PDPage.class line 825, and pageIndex never advances past 1, even though the breakpoint keeps being hit.

The stack is:

Thread [main] (Suspended (breakpoint at line 825 in org.apache.pdfbox.pdmodel.PDPage))
                org.apache.pdfbox.pdmodel.PDPage.print(java.awt.Graphics, java.awt.print.PageFormat, int) line: 825
                sun.awt.windows.WPathGraphics.redrawRegion(java.awt.geom.Rectangle2D, double, double, java.awt.geom.Rectangle2D, java.awt.geom.AffineTransform) line: 984
                sun.awt.windows.WPrinterJob(sun.print.RasterPrinterJob).printPage(java.awt.print.Pageable, int) line: 1904
                sun.awt.windows.WPrinterJob(sun.print.RasterPrinterJob).print(javax.print.attribute.PrintRequestAttributeSet) line: 1388
                sun.awt.windows.WPrinterJob(sun.print.RasterPrinterJob).print() line: 1250
                org.apache.pdfbox.pdmodel.PDDocument.print(java.awt.print.PrinterJob, boolean) line: 1273
                org.apache.pdfbox.pdmodel.PDDocument.silentPrint(java.awt.print.PrinterJob) line: 1264


Thanks,
John Fratila

**************************************************************************************************
Note: 
The information contained in this message may be privileged and confidential and 
protected from disclosure.  If the reader of this message is not the intended  
recipient, or an employee or agent responsible for delivering this message to  
the intended recipient, you are hereby notified that any dissemination,   
distribution or copying of this communication is strictly prohibited. If you  
have received this communication in error, please notify us immediately by  
replying to the message and deleting it from your computer. 
**************************************************************************************************

Re: Infinite loop trying to print PDF?

Posted by Andreas Lehmkuehler <an...@lehmi.de>.
Hi,

Am 31.10.2011 18:14, schrieb Fratila, Johnny:
> I have a PDF that uses a rasterized font on page 2.  When trying to print it using PDFBox it seems to be stuck in an infinite loop.  I set a breakpoint at PDPage.class line 825, and pageIndex never advances past 1, even though the breakpoint keeps being hit.
>
> The stack is:
>
> Thread [main] (Suspended (breakpoint at line 825 in org.apache.pdfbox.pdmodel.PDPage))
>                  org.apache.pdfbox.pdmodel.PDPage.print(java.awt.Graphics, java.awt.print.PageFormat, int) line: 825
>                  sun.awt.windows.WPathGraphics.redrawRegion(java.awt.geom.Rectangle2D, double, double, java.awt.geom.Rectangle2D, java.awt.geom.AffineTransform) line: 984
>                  sun.awt.windows.WPrinterJob(sun.print.RasterPrinterJob).printPage(java.awt.print.Pageable, int) line: 1904
>                  sun.awt.windows.WPrinterJob(sun.print.RasterPrinterJob).print(javax.print.attribute.PrintRequestAttributeSet) line: 1388
>                  sun.awt.windows.WPrinterJob(sun.print.RasterPrinterJob).print() line: 1250
>                  org.apache.pdfbox.pdmodel.PDDocument.print(java.awt.print.PrinterJob, boolean) line: 1273
>                  org.apache.pdfbox.pdmodel.PDDocument.silentPrint(java.awt.print.PrinterJob) line: 1264
>
>
> Thanks,
> John Fratila
>
> **************************************************************************************************
> Note:
> The information contained in this message may be privileged and confidential and
> protected from disclosure.  If the reader of this message is not the intended
> recipient, or an employee or agent responsible for delivering this message to
> the intended recipient, you are hereby notified that any dissemination,
> distribution or copying of this communication is strictly prohibited. If you
> have received this communication in error, please notify us immediately by
> replying to the message and deleting it from your computer.
> **************************************************************************************************

Without having a hand on the pdf it'll be impossible to guess what's going wrong.

Please create an issue on JIRA [1] and attach the pdf to it.

BR
Andreas Lehmkühler

[1] https://issues.apache.org/jira/browse/PDFBOX