Re: PDFBox corrupting PDFs when saving

2021-07-29 Thread Andreas Lehmkuehler
cument.close(); Any thoughts very much appreciated, I am stuck. Alex -Original Message- From: Andreas Lehmkuehler [mailto:andr...@lehmi.de] Sent: Thursday, July 29, 2021 1:05 PM To: users@pdfbox.apache.org Subject: Re: PDFBox corrupting PDFs when saving Am 28.07.21 um 22:22 schrieb Alex

Re: PDFBox corrupting PDFs when saving

2021-07-29 Thread Tilman Hausherr
Am 29.07.2021 um 22:09 schrieb Alexander Slonim: And all I do is document.save(tempFile); document.close(); I did just that, with 2.0.24, without using your project (but I downloaded your chicken.pdf file).     PDDocument doc = PDDocument.load(new File("chicken.pdf"));

RE: PDFBox corrupting PDFs when saving

2021-07-29 Thread Alexander Slonim
cument.save(tempFile); document.close(); Any thoughts very much appreciated, I am stuck. Alex -Original Message- From: Andreas Lehmkuehler [mailto:andr...@lehmi.de] Sent: Thursday, July 29, 2021 1:05 PM To: users@pdfbox.apache.org Subject: Re: PDFBox corrupting PDFs when savin

Re: PDFBox corrupting PDFs when saving

2021-07-29 Thread Andreas Lehmkuehler
Am 28.07.21 um 22:22 schrieb Alexander Slonim: Hello, When I attempt to use PDDocument.save, the saved output file is corrupted, even when no action is taken on the file other than saving it. Works fine for me using the current trunk and my own code Your test cases are probleatic. The first o

RE: PDFBox corrupting PDFs when saving

2021-07-29 Thread Jason Pyeron
Thursday, July 29, 2021 3:07 AM > To: users@pdfbox.apache.org > Subject: Re: PDFBox corrupting PDFs when saving > > I haven't tested your code yet (might do later), but in the code I see > you're loading from a resource. Could it be the resource filtering problem? > > ht

RE: PDFBox corrupting PDFs when saving

2021-07-29 Thread Alexander Slonim
: Thursday, July 29, 2021 3:07 AM To: users@pdfbox.apache.org Subject: Re: PDFBox corrupting PDFs when saving I haven't tested your code yet (might do later), but in the code I see you're loading from a resource. Could it be the resource filtering problem? https://maven.apache.org/plugins/ma

Re: PDFBox corrupting PDFs when saving

2021-07-29 Thread Tilman Hausherr
I haven't tested your code yet (might do later), but in the code I see you're loading from a resource. Could it be the resource filtering problem? https://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html Which of the tests fail? All three? Only one? Tilman Am 28.07.2021 um

PDFBox corrupting PDFs when saving

2021-07-28 Thread Alexander Slonim
Hello, When I attempt to use PDDocument.save, the saved output file is corrupted, even when no action is taken on the file other than saving it. For example: ``` File file = new File("C:\\Users\\Public\\Desktop\\projects\\test-pdfbox-corruption\\src\\mai n\\resources\\chicken.pdf");