pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Siegrist <Jan.Siegr...@mediware.com>
Subject PDFBox fails when printing a filled in PDF
Date Thu, 05 Jul 2012 20:57:04 GMT
Greetings

 

Info: PDFBox version 1.7.0 - printing from command line:

c:\PDF\PDFBox>java -jar c:\pdf\pdfbox\pdfbox-app-1.7.0.jar PrintPDF
c:\pdf\pdfbox\abn_george.pdf

 

I get the following message when attempting to print a "filled in" PDF.

 

PrintPDF failed with the following exception:

java.lang.ClassCastException: org.apache.pdfbox.cos.COSArray cannot be
cast to org.apache.pdfbox.cos.COSStream

        at
org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceDictionary.
getNormalAppearance(PDAppearanceDictionary.java:103)

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

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

        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:1314)

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

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

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

 

If I print the same file but not filled in, it works.

 

Is this something fairly easy to fix or code-around?  Any suggestions as
to where to start looking?

 

 

Sincerely,

 

Jan Siegrist

Software Engineer - Alternate Care Software

MEDIWARE INFORMATION SYSTEMS, INC.

Office: (401) 572-3241

Fax:    (401) 572-3350

jan.siegrist@mediware.com <mailto:jan.siegrist@mediware.com> 
Visit our new Mediware user community for product documentation, user
forums and software downloads!  www.mediwareusers.org
<http://www.mediwareusers.org> 

>From enterprise to hosted solutions, Mediware(r) is the first choice for
home care.

This message (including any attachments) constitutes a confidential
and/or privileged communication and/or contains confidential information
intended for a specific individual and purpose, and is protected by law.
If you are not the intended recipient, please notify the sender by
return email and delete this message and any attachments. Any
disclosure, copying, or distribution of this message, or the taking of
any action based on it, is strictly prohibited. Nothing in this email is
intended to create a binding agreement between Mediware Information
Systems, Inc. and any third party. 

 

 


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