Replies: 1   Views: 378
Multiple signatures for a document
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by Thierry DUPONT  · 22-10-2021 - 11:24

Hi all,

Do you what the process for digitally sign for multiple users?
Can we add signature for a document and after another in a second time?

How to proceed if we have to put the name / first name in an insert in the file?
The first signature will no longer be valid when we add the second because the document will be modified.

Or the solution is?
- we have a document A.
- first signing. We save the sign doc (doc1).
- second signing. We save the sign doc (doc2).
- and after signing document A with two signs. We have also a new document (doc3).
Doc1 & doc2 allow to keep a trace that the original document has not been modified except for the addition of the surnames / first names in the document.

Is it the right approach?

Thank you for your help. 

Posted by admin  · 22-10-2021 - 11:39


All documents (DOCX, PDF, XLSX, PPTX) can be signed using more than one signature using signature methods included in Premium licenses (

For example, you can sign a DOCX:

$sign = new SignDOCX();
$sign->setPrivateKey('key_1.pem', 'phpdocx');
$sign->setSignatureComments('This document has been signed.');

If you change the signed DOCX using phpdocx or any other tool, MS Word and other DOCX readers will display a message that the document has changed and the signature is not valid.

The same DOCX can be signed again adding a new signature (the same or other signature):

$sign = new SignDOCX();
$sign->setPrivateKey('key_2.pem', 'otherpassword');
$sign->setSignatureComments('This document has been signed.');

and you'll get a DOCX with two signatures (or more if needed).

Since phpdocx 12, the Indexer class ( allows extracing signatures information from a DOCX.