>On Thu, 2016-09-15 at 16:07 +0000, Thomas Szendefi wrote:
>> I have that code running with 0.9.4, but it prints the following error 
>> message on the console for almost every PDF I try:
>> PoDoFo encounter an error. Error: 5 ePdfError_UnexpectedEOF ??????? 
>> Error Description: End of file was reached unxexpectedly.
>> ??????? Callstack:
>> ??????? #0 Error Source: /proj/sc5/src/mu/components/libs/podofo-
>> 0.9.4/src/base/PdfParserObject.cpp:199
>> ??????????????? Information: Expected variant.
>> ?
>> (Thrown in the very beginning inside PdfSigIncMemDocument::Write())
>
>       Hi,
>there is some issue in the code which can lead to crash for certain PDF
>files. I didn't investigate it into more deep, I only managed to write
>a workaround to not cause the crash and to not throw the above exception.
>
>You can find the workaround attached. I hesitate to commit it to PoDoFo
>sources, but maybe I'll just do it for the time being.
>
>As I understand the issue, the incSign document stole the page
>to its content fromt he underlying memDocument, which results into
>the delayed load to use wrong owner, thus fails to load. As the page
>is in both documents a double-free happens when both incSign and the
>memDocument are freed after the signing.
>
>I've even written a patch to extend the incremental signing drawing,
>to be more generic, but it changes API.
>
>The only correct way to fix this is to write complete incremental
>editing for PoDoFo, but that's quite out of my hands at the moment.
>As I wrote above, maybe I'll commit both changes for the time being,
>thus the PoDoFo will be usable, until someone brave will implement
>the full incremental editing.
>       Bye,
>       zyx
>
>P.S.: with the attached patch I can sign your simple.pdf

Thank you for your efforts, the patch works fine! (I applied it to
the latest version in the repository, rev 1779).

Do you have any idea why the signature is not recognized by Adobe Reader
if there are form fields inside the signed PDF? PDFs without any formfields
are working fine now.

Regards,
Thomas

------------------------------------------------------------------------------
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to