Am 27.07.2015 um 12:49 schrieb Roberto Nibali:
I have uploaded the PDFs here (for a limited time):
ccalt-simple.pdf
<https://drive.google.com/file/d/0B7Bzk_1dcyc5RmcyWVo1ZURyV0k/view?usp=drive_web>
cctemp-simple.pdf
<https://drive.google.com/file/d/0B7Bzk_1dcyc5UHUtNWh6ampVMnc/view?usp=drive_web>
You should already have the code to reproduce my issue from a previous
email to this thread.
Thanks.
I was able to reproduce the effect with this code:
public class RobertoNibaliSaveProblem
{
public static void main(String[] args) throws IOException
{
String dir = ......;
PDDocument tplDoc = PDDocument.load(new File(dir,
"cctemp-simple.pdf"));
tplDoc.getDocumentCatalog().getAcroForm().setNeedAppearances(true);
tplDoc.save(new File(dir,"dest.pdf"));
tplDoc.close();
PDDocument.load(new File(dir,"dest.pdf")).close();
}
}
Sadly, with the "bad" code, PDFBox doesn't fail, so we can't create a
test easily. It just prints two log lines:
27.07.2015 20:54:40.006 ERROR [main]
org.apache.pdfbox.pdfparser.COSParser:1200 - Can't find the object axref
table/stream at offset 607694
27.07.2015 20:54:40.010 WARN [main]
org.apache.pdfbox.pdfparser.XrefTrailerResolver:253 - Did not found XRef
object pointed to by 'Prev' key at position 0
I was able to display the file with PDFBox. So in this rare case, we're
better than Adobe Reader!
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org