node-signpdf icon indicating copy to clipboard operation
node-signpdf copied to clipboard

add signer and sign in a signed pdf

Open aallvi opened this issue 3 years ago • 3 comments

Hi vbuch and devs, i have a problem doing this, i sign a pdf with node sign without problems, i add placeholder, the signature and all.

The problem is that i need to add another signature to the pdf and i create another placeholder and when i try to sign, the new signature erase de old signature, so in the adobe acrobat i can see only the new signature.

i know that this is posible with this library, in the resources folder i see a pdf with 2 signatures.

you can see the code here https://github.com/aallvi/signature/blob/main/src/SignPDF.js , is the code of some guy thats make a video of this. i make some changes for my project.

when i took a signed pdf and i try to sign again, the new signature delete the old.

any help or guidance is appreciated.

Thanks.

aallvi avatar Aug 23 '22 20:08 aallvi

with this code https://github.com/aallvi/signature/blob/main/src/prueba.js

i can sign twice a pdf, but in the second signature, i cant put the qrcode and the text because obviusly the pdf is diferent when the have the first signature, so is invalid.

anybody have some idea how to d this, sign in second time with the p12 and a image in the pdf, without the adobe acrobat say that is invalid?

aallvi avatar Aug 24 '22 21:08 aallvi

Hi there. The first important part to understand is incremental updates of PDFs. If you are altering a signed PDF that doesn't make make the previous signature invalid directly. It was valid to the revision before you altered it. Once you understand incremental updates you will know how multiple signatures in PDF work. There is no such thing as "two parties signed the document simultaneously". The two parties rather pass the document on the table so one is signing a "blank" document and the second is signing an already signed document. I would suggest you try with some simplier scenarios (with simplified PDFs as well) before shooting at the real world ones.

vbuch avatar Aug 25 '22 05:08 vbuch

Hi, thanks for your answer. I understand that you say, so can i make incremental updates with this library? in the description in npm says: 'does not cover multiple signatures, incremental updates, etc. Only the basic scenario of signing a freshly created PDF'

but in resources are an incremental pdf signed, can you give me some guidance? some example of how to can 'tell' to the pdf thats the new modification (like a image or a qr) in pdf is a signature and not a modification in the content?

if i cant do that with node-sign i like to know that, because i need to think how i continue with my project.

Thanks!

aallvi avatar Aug 25 '22 16:08 aallvi

This issue has been automatically marked as stale because it has not had activity in the past 90 days. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 31 '22 23:12 stale[bot]