pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Liston" <list...@asconline.com>
Subject Problem displaying PDFBox 2.0RC3 document in Acrobat Reader
Date Fri, 19 Feb 2016 19:56:13 GMT
A document generated using PDFBox 2.0.0-RC3 cannot be read fully by the latest version of Adobe
Acrobat Reader, which says "An error exists on this page. Acrobat may not display the page
correctly. Please contact the person who created the PDF document to correct the problem." 
The identical document created using PDFBox 1.8.11 reads in Acrobat Reader just fine.  After
using Acrobat Pro to increase the width of the bounding box around the first page text "Can
this amount change after closing?", the rest of the text on the page showed up.  The same
problem showed up with other text on the following pages. Both documents read and display
properly using PDFBox PDFDebugger.

www.pdf-tools.com/pdf/validate-pdfa-online.aspx says the differences between the 1.8.11 analysis
and the 2.0.0-RC3 analysis are:
               The key Type is required but missing. (2)
               The operator has an invalid number of operands. (5)
               The document doesn't conform to the PDF reference (missing required
entries, wrong value types, etc.)

The font being used is PDType1Font.HELVETICA. The code being used to print the text is straightforward:
try {
               // position is offset from the bottom left corner of the page
               // (the font is set in a prior .font() call)
               // 1/2016 1.x: pdContent.moveTextPositionByAmount(points(dHoriz),
               pdContent.newLineAtOffset(points(dHoriz), posY(dVert));
               // 1/2016: pdContent.drawString(textOrCallback.toString());
catch (IOException ioe) {
               // (unlikely)
               throw new RuntimeException(ioe);
We substituted the (deprecated) .drawString() for .showText() with the same error result.

The 1.8.11 and 2.0.0-RC3 documents can be retrieved at:

Please let us know what more we can do or provide to help resolve this problem. Thanks. 

To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org

View raw message