Return-Path: X-Original-To: apmail-pdfbox-users-archive@www.apache.org Delivered-To: apmail-pdfbox-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D543DCD3D for ; Thu, 5 Jul 2012 21:02:23 +0000 (UTC) Received: (qmail 69441 invoked by uid 500); 5 Jul 2012 21:02:23 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 69429 invoked by uid 500); 5 Jul 2012 21:02:23 -0000 Mailing-List: contact users-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@pdfbox.apache.org Delivered-To: mailing list users@pdfbox.apache.org Delivered-To: moderator for users@pdfbox.apache.org Received: (qmail 52113 invoked by uid 99); 5 Jul 2012 20:56:57 -0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL,T_OBFU_PDF_ATTACH X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of Jan.Siegrist@mediware.com does not designate 213.199.154.205 as permitted sender) X-Forefront-Antispam-Report: CIP:65.171.153.25;KIP:(null);UIP:(null);IPV:NLI;H:KCMISMX01.mis.mediware.com;RD:none;EFVD:NLI X-SpamScore: -1 X-BigFish: VPS-1(zzb36Rc85fh103eMa083vzz1202hzz8275bh8275dhz31h668h839ha12hd25hf0ah107ah34h) Received-SPF: softfail (mail96-am1: transitioning domain of mediware.com does not designate 65.171.153.25 as permitted sender) client-ip=65.171.153.25; envelope-from=Jan.Siegrist@mediware.com; helo=KCMISMX01.mis.mediware.com ;mediware.com ; X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01CD5AF0.9DC5B823" Subject: PDFBox fails when printing a filled in PDF Date: Thu, 5 Jul 2012 15:57:04 -0500 Message-ID: <89BF877C1A861644BB38158354F8BA3116C77C13@KCMISMX01.mis.mediware.com> X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Thread-Topic: PDFBox fails when printing a filled in PDF Thread-Index: Ac1a8Ltdy2r+2dS2TpKFnTRX/yvk+Q== From: Jan Siegrist To: X-OriginatorOrg: mediware.com ------_=_NextPart_001_01CD5AF0.9DC5B823 Content-Type: multipart/alternative; boundary="----_=_NextPart_002_01CD5AF0.9DC5B823" ------_=_NextPart_002_01CD5AF0.9DC5B823 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Greetings =20 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 =20 I get the following message when attempting to print a "filled in" PDF. =20 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) =20 If I print the same file but not filled in, it works. =20 Is this something fairly easy to fix or code-around? Any suggestions as to where to start looking? =20 =20 Sincerely, =20 Jan Siegrist Software Engineer - Alternate Care Software MEDIWARE INFORMATION SYSTEMS, INC. Office: (401) 572-3241 Fax: (401) 572-3350 jan.siegrist@mediware.com =20 Visit our new Mediware user community for product documentation, user forums and software downloads! www.mediwareusers.org =20 >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.=20 =20 =20 ------_=_NextPart_002_01CD5AF0.9DC5B823 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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.g= etNormalAppearance(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: &nb= sp;  (401) 572-3350

jan.siegrist@mediware.com
Visit our new Mediware user community for product = documentation, user forums and software downloads!  www.mediwareusers.org

From enterprise to = hosted solutions, Mediware® 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. 

 

 

------_=_NextPart_002_01CD5AF0.9DC5B823-- ------_=_NextPart_001_01CD5AF0.9DC5B823--