[poppler] another problem with saving linearized files
Axel Strübing
axel.struebing at freenet.de
Fri Jun 10 08:15:58 PDT 2011
Hi all,
> Please, send a patch, will make everyone lives easier. And also send a PDF
> and some code to prove your patch has benefits at least for a given case.
>
> Albert
>
as it was not as clear as possible in the first message, I want to clarify
that the problem is in saving a modified file incrementally by giving
writeForceIncremental flag to PDFDoc->saveAs. The problem occurs only if the
file is linearized.
I attached a patch, which modifies the original behaviour of getStartXRef for
the case that the file is linearized. With the patch applied my application
modifies the file okay.
I also attached the original (test2.pdf) and modified files before and after
applying the patch, respectively.
openTest.pl uses CAM::PDF and demonstate my problem. It opens test2.pdf and
test2-afterPatch.pdf okay but not test2-beforePatch.pdf
If I could assist you any further don't hesitate to contact me.
--
regards
Axel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PDFDoc.patch
Type: text/x-patch
Size: 368 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110610/a0240838/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2-afterPatch.pdf
Type: application/pdf
Size: 10923 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110610/a0240838/attachment-0003.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2-beforePatch.pdf
Type: application/pdf
Size: 10922 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110610/a0240838/attachment-0004.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.pdf
Type: application/pdf
Size: 9161 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110610/a0240838/attachment-0005.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openTest.pl
Type: application/x-perl
Size: 329 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110610/a0240838/attachment-0003.bin>
More information about the poppler
mailing list