Forum


Replies: 5   Views: 1160
Add multiple signatures in one pdf
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 diogocnunes  · 24-11-2020 - 15:57

Hi, i need to put two or more signatures in one PDF. Is it possible with phpdocx?

I tried this way, but the final file came only with the last signature...

$sign = new SignPDF();
$sign->setPDF(storage_path('app/manual_SEPA.pdf'));
$sign->setPrivateKey(storage_path('app/signatures/cert1.pem'), 'test');
$sign->setX509Certificate(storage_path('app/signatures/cert1.pem'));
$sign->sign(storage_path('app/manual_SEPA_signed.pdf'));

$sign2 = new SignPDF();
$sign2->setPDF(storage_path('app/manual_SEPA_signed.pdf'));
$sign2->setPrivateKey(storage_path('app/signatures/cert2.pem'), 'test');
$sign2->setX509Certificate(storage_path('app/signatures/cert2.pem'));
$sign2->sign(storage_path('app/manual_SEPA_signed_signed.pdf'));

I tried put all in one SignPDF instance, but doesn't work too...

Can someone help me?