I am trying to print a .pdf file using PDFBox.  Inside our app we are
running an old version (0.7.3).  One of our users said that they cannot
print PDF's with an image inside the file, it just leaves the image out.
So I am looking to upgrade our app to 1.5.0.  However when I attempt to
run PDFBox in command mode to print the .pdf file, it stops where the
image is located (in the header) and does not print anything on the page
other than the first part of the header underline.  I have a second PDF
file with an image and it just doesn't print the image but prints all of
the text.

 

I am running on a Windows 7 64 bit machine.  I am just running this from
the command line, although I have the same problem when running with
1.5.0 through our application.

 

The first file does not give an error.  The second one gives the
following stack trace.

 

c:\Workspace\Ajent_Tools\PDFBox-1.5.0>java -jar pdfbox-app-1.5.0.jar
PrintPDF test2.pdf

 

Apr 26, 2011 9:00:02 AM org.apache.pdfbox.util.PDFStreamEngine
processOperator

WARNING: java.lang.ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException

        at java.lang.System.arraycopy(Native Method)

        at
org.apache.pdfbox.pdmodel.graphics.xobject.PDInlinedImage.createImage(PD
InlinedImage.java:187)

        at
org.apache.pdfbox.util.operator.pagedrawer.BeginInlineImage.process(Begi
nInlineImage.java:64)

        at
org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.j
ava:551)

        at
org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.
java:274)

        at
org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.
java:251)

        at
org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.jav
a:225)

        at
org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:107)

        at org.apache.pdfbox.pdmodel.PDPage.print(PDPage.java:824)

        at sun.print.RasterPrinterJob.printPage(Unknown Source)

        at sun.print.RasterPrinterJob.print(Unknown Source)

        at sun.print.RasterPrinterJob.print(Unknown Source)

        at
org.apache.pdfbox.pdmodel.PDDocument.print(PDDocument.java:1039)

        at
org.apache.pdfbox.pdmodel.PDDocument.print(PDDocument.java:986)

        at org.apache.pdfbox.PrintPDF.main(PrintPDF.java:129)

        at org.apache.pdfbox.PDFBox.main(PDFBox.java:46)

Apr 26, 2011 9:00:02 AM org.apache.pdfbox.util.PDFStreamEngine
processOperator

INFO: unsupported/disabled operation: EI

Apr 26, 2011 9:00:03 AM org.apache.pdfbox.util.PDFStreamEngine
processOperator

WARNING: java.lang.ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException

        at java.lang.System.arraycopy(Native Method)

        at
org.apache.pdfbox.pdmodel.graphics.xobject.PDInlinedImage.createImage(PD
InlinedImage.java:187)

        at
org.apache.pdfbox.util.operator.pagedrawer.BeginInlineImage.process(Begi
nInlineImage.java:64)

        at
org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.j
ava:551)

        at
org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.
java:274)

        at
org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.
java:251)

        at
org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.jav
a:225)

        at
org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:107)

        at org.apache.pdfbox.pdmodel.PDPage.print(PDPage.java:824)

        at sun.print.RasterPrinterJob.printPage(Unknown Source)

        at sun.print.RasterPrinterJob.print(Unknown Source)

        at sun.print.RasterPrinterJob.print(Unknown Source)

        at
org.apache.pdfbox.pdmodel.PDDocument.print(PDDocument.java:1039)

        at
org.apache.pdfbox.pdmodel.PDDocument.print(PDDocument.java:986)

        at org.apache.pdfbox.PrintPDF.main(PrintPDF.java:129)

        at org.apache.pdfbox.PDFBox.main(PDFBox.java:46)

Apr 26, 2011 9:00:03 AM org.apache.pdfbox.util.PDFStreamEngine
processOperator

INFO: unsupported/disabled operation: EI

 

 

Any help on what to do so that images will print correctly will be
appreciated.

 

 

David Johns
Software Engineer
Columbia Ultimate

 

 

Reply via email to