Replies: 1   Views: 940
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 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.