pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maruan Sahyoun <sahy...@fileaffairs.de>
Subject Re: PDDocument unreadable in Acrobat 7 after simple load/save
Date Mon, 12 Oct 2015 15:59:39 GMT
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 <KTernes@thegeneral.com>:
> 
> 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: users@pdfbox.apache.org
> 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: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 


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


Mime
View raw message