Incremental Save using pdfium.

426 views
Skip to first unread message

Chery Cherian

unread,
Nov 8, 2016, 8:33:27 AM11/8/16
to pdfium
Hi All, 

We are looking to save a pdf file incrementally using pdfium. We noticed a FPDF_INCREMENTAL flag defined in fpdf_save.h and tried to use it as a parameter to FPDF_SaveAsCopy.
Unfortunately for us that didn't work as expected. Although it appended an additional trailer object to the original content, it did not append the modified object streams.
As a result the document ended up being corrupt.

My questions are:
  1. Are we right in assuming that FPDF_INCREMENTAL is for incremental saving (for a write-up on incremental update click here) ?
  2. Are there any additional steps that need to be done to get this working?
  3. Is this a bug ?
Sample attachments:
  1. Original document
  2. Document saved incrementally using Adobe
  3. Corrupt document saved using pdfium.
Kind Regards
Chery
Acroform_Sample.pdf
Acroform_Sample_Adobe.pdf
Acroform_Sample_pdfium.pdf

Dan Sinclair

unread,
Nov 8, 2016, 9:01:03 AM11/8/16
to Chery Cherian, pdfium
That sounds like a bug if it's producing corrupted PDF files. I don't know if the incremental code paths have ever been used so it's quite possible they are broken.  Can you file a bug in the bug tracker [1]? If you can attach a repro program that would be greatly appreciated.

Thanks,
dan



--
You received this message because you are subscribed to the Google Groups "pdfium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfium+un...@googlegroups.com.
To post to this group, send email to pdf...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pdfium/3ada006a-b7a6-45ba-b38c-a91ced623f21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lei Zhang

unread,
Nov 8, 2016, 1:25:05 PM11/8/16
to Dan Sinclair, Chery Cherian, pdfium
Reply all
Reply to author
Forward
0 new messages