If I open either the source or the generated file with Acrobat Reader XI, the 
properties say that the file is a 1.6 (Acrobat 7) PDF.

I can also use Acrobat Reader XI to make a small change OR actually downgrade 
the generated file to a 1.5 (Acrobat 6) PDF, save it, and in either case we can 
read it with Reader 7.

However, if I use Acrobat XI to change or downgrade the _source_ file and then 
generate another file through PDFBox as shown below, then that generated file 
cannot be opened by this user's installation of Reader 7.

Yes, we have this problem either opening the file from the disc (ie: saving it 
to a file in a folder and double-clicking) or when generated and streamed by a 
servlet and then opened by an IE web browser in Reader.

Yes, it always happens for both installations of Acrobat 7 Reader that we have 
tested.  (Windows 7 64-bit and Windows 10 64-bit).

Yes, the problem is apparent for a number of different source and generated PDF 
files we have tried.


-----Original Message-----
From: Maruan Sahyoun [mailto:[email protected]] 
Sent: Monday, October 12, 2015 11:00 AM
To: [email protected]
Subject: Re: PDDocument unreadable in Acrobat 7 after simple load/save

Hi,

could you save the file in Adobe Acrobat as version 1.6 file and check if that 
can be opened without issues? Is the user opening the file from disc? Does that 
always happen for her installation?

BR
Maruan

> Am 12.10.2015 um 17:48 schrieb Kevin Ternes <[email protected]>:
> 
> Does anyone have any feedback for me on this problem?
> Should PDFBox 2 generate output that Reader 7 can open?
> Should I open a Jira issue for this?
> 
> -----Original Message-----
> From: Kevin Ternes 
> Sent: Thursday, October 08, 2015 2:27 PM
> To: [email protected]
> Subject: PDDocument unreadable in Acrobat 7 after simple load/save
> 
> I am working with a file using pdfbox-2.0.0-20151007.203054-1746 and I can 
> open both the input and output file with Acrobat Reader XI.
> According to Acrobat Reader for both input and output documents, PDF Version 
> 1.6 (Acrobat 7.x)
> 
> I have a user reporting that she can open the input file, but cannot open the 
> output version of that file.
> She gets a popup on the processed file from Acrobat saying "There was an 
> error opening this document. The file is damaged and could not be repaired."
> She is using Acrobat Reader 7 on Win7 64-bit SP1.
> 
> I have reduced the problem down to the following load/save and we still get 
> the error on the saved file:
> public class PDFBoxRunLoadSave {
>  public static void main(String[] args) {
>    PDDocument pdDocumentA = null;
>    try {
>        pdDocumentA = PDDocument.load(new File("CancelPolicy-0.pdf"));
>        pdDocumentA.save("CancelPolicy-1.pdf");
>    } catch (Exception ex) {
>        System.err.println("Caught " + ex);
>        ex.printStackTrace();
>    } finally {
>        close(pdDocumentA);
>    }
>  }
> 
>  static void close(PDDocument doc) {
>    if (null != doc) {
>      try { doc.close(); } catch (Exception ex) {
>        System.out.println("Closing, caught " + ex);
>      }
>    }
>  }
> }
> 
> And here are the loaded and saved files:
> Load: https://dl.dropboxusercontent.com/u/3103884/dev/CancelPolicy-0.pdf  17KB
> Save: https://dl.dropboxusercontent.com/u/3103884/dev/CancelPolicy-1.pdf   
> 21KB (why is the output larger?)
> 
> Is it possible that PDFBox is breaking the output file in a way that Acrobat 
> 7 cannot read it but Acrobat XI can?
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to