Forum


Replies: 1   Views: 770
Certificate for signing a pdf file
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 jeremie  · 16-10-2020 - 14:59

I'm trying to sign a PDF file.

I bought a certificate from GlobalSign. They sent me a .pfx file that I converted to a .pem file. Then I signed the PDF using your code:

require_once $root.'Libraries/phpdocx-premium-9.5/classes/SignPDF.php'; 
$sign = new SignPDF(); 
$sign->setPDF('Test.pdf');
$sign->setPrivateKey('Test.pem', 'phpdocx_pass'); 
$sign->setX509Certificate('Test.pem'); 
$sign->sign('Test_signed.pdf');

'Test_signed.pdf' is created and I can see the signature in it when I open it with Adobe Acrobat Reader.

I can see my name on it, but Adobe displays a message saying that the validity of the certification is uknown because they can't authenticate me.

What am I missing?

 

Posted by admin  · 16-10-2020 - 15:48

Hello,

Adobe, and other programs, displays the validity of the certification is uknown message when the certificate/CA is not trusted by Adobe, so you need to accept (trust) it or use a certificate accepted in Adobe as trusted.

We recommend you to check if AATL is updated in your Adobe PDF reader (https://support.globalsign.com/aatl-document/how-manually-update-adobe-approved-trust-list-aatl-adobe-acrobat-reader) and the certificate/CA you are using is trusted by Adobe. 

On https://stackoverflow.com/questions/13979845/signed-pdf-showing-message-the-validity-of-the-document-is-unknown-itext you can read more information when Adobe displays that message.

Regards.