Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I visit into a similar issue in another post. Using FPDI and TCPDF I can sign a PDF document with a signature without problems, but when it comes to multiple signatures the previous signature remains unformatted and only the last signed is valid. Solution can you recommend me?, Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
628 views
Welcome To Ask or Share your Answers For Others

1 Answer

UPDATE

I was checking the latest version of the TCPDF code and see that setSignature() has a paramater called $approval. If it sets to 'A' , the code does different processing for the digital signature and the parameter descriptions suggests it is for incremental update (i.e. @param $approval (string) Enable approval signature eg. for PDF incremental update). I haven't seen that value being mentioned in the documentation. Try using that for additional signatures after the first one.

setSignature() method

putSignature() method

Or use a paid solution like PDFTron, which supports PDF

https://www.pdftron.com/documentation/samples/php/DigitalSignaturesTest

ORIGINAL VERSION

This can only be done through incremental update, which allows appending new section without modifying the original document that's been signed previously. See section 7.5.6 in PDF format spec:

https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf

TCPDF does not support incremental update. See the help forum question:

https://sourceforge.net/p/tcpdf/discussion/435311/thread/8cf24d19/

You need to use a library that supports incremental update. Once such library is SignPDF from NodeJS world. Here is the issue ticket that's been discussed multiple signatures. Maybe you can have this as a back-end service just for applying signatures for this portion of your app.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...