Closed nihaopaul closed 3 years ago
Hi, it is the same problem I have.
Have you found a solution?
I have a document in which I add a text before signing it. But adding the text with pdf-lib
does not respect the incremental signature structure.
Before adding the second stamp:
%PDF-1.7
<<content>>
<<
/Type /Sig
/Filter /Adobe.PPKLite
/SubFilter /adbe.pkcs7.detached
/ByteRange [ 0 xx xxxx xxx ]
/Contents <xxxxxxxxxxxxxxx>
startxref
xxxx
%%EOF
After adding the text:
%PDF-1.7
<<content>>
<<
/Type /Sig
/Filter /Adobe.PPKLite
/SubFilter /adbe.pkcs7.detached
/ByteRange [ 0 xx xxxx xxx ]
/Contents <xxxxxxxxxxxxxxx>
<<who adds the text content using pdf-lib>>
startxref
xxxx
%%EOF
But, the correct thing would be:
%PDF-1.7
<<content>>
<<
/Type /Sig
/Filter /Adobe.PPKLite
/SubFilter /adbe.pkcs7.detached
/ByteRange [ 0 xx xxxx xxx ]
/Contents <xxxxxxxxxxxxxxx>
startxref
xxxx
%%EOF
<<who adds the text content using pdf-lib>>
startxref
xxxx
%%EOF
Do you have any ideas to correct this problem or is there no solution in this library?
Hi, Any updates on this ?
Not yet, but it's on the roadmap: https://github.com/Hopding/pdf-lib/discussions/998.
hi, i am trying to do the same thing that your , how you get a solution? i need tu put image in a pdf that already have a signature.
pdf-lib accept now the incremental saves and updates? you use another library? any help is appreciate.
Thanks
can PDF-LIB support incremental updates? i loaded a document that was signed with incremental updates and then saved it again and noticed all of the incremental updates
startxref n.. %%EOF
startxref n.. %%EOF
startxref n.. %%EOF
had been collapsed into one at the end, i was testing if pdf-lib could be used to build PAdes-LTV PDF's, the only part not found is the incremental updates but i've been amazed by this library so far. the only other way is that i manually append to the document but that gets messy on a double signature.
Any luck finding a solution in javascript?
Hi patrik, i dont found a solution in javascript, i have to change this part of my aplication to python, with a library called endesive, is easy to use, i recommended to you to use
Thanks, I also tried pymupdf. Well hummusjs (not maintained any longer) does incremental updates, I tried it and it works.
can PDF-LIB support incremental updates? i loaded a document that was signed with incremental updates and then saved it again and noticed all of the incremental updates
startxref n.. %%EOF
startxref n.. %%EOF
startxref n.. %%EOF
had been collapsed into one at the end, i was testing if pdf-lib could be used to build PAdes-LTV PDF's, the only part not found is the incremental updates but i've been amazed by this library so far. the only other way is that i manually append to the document but that gets messy on a double signature.