Good morning,
I have a Certeurope USB key which allows me to sign Electronically PDF documents.
I would like to be able to sign PDF with this programming certificate.
I tried with the SingPDF function (I have version 10 of PHPDOCX)
The signature is done well but the signature is not validated.
The error message (when you open the PDF) is: signing authentication error, error during Decoding BER
To recover the certificate of the Certeurope key, I open the software "Trusted Key Manager" I enter the pin code of the USB key, I will in information, and I export the .PEM (we can also export a certificate .der But I don't know)
Here is how I proceed:
$sign = new Phpdocx\Sign\SignPDF();
$sign->setPDF('test.pdf');
$sign->setPrivateKey('cert.pem', 'xxxx');
$sign->setX509Certificate('cert.pem');
$sign->sign('output_sign.pdf');
Do you have an idea of the procedure to follow so that the signature is valid?
(I opened the signature on Nitro Pro, Acrobat Reader and PDF Creator) The problem is the same, and there is no information indicated in the signature, as if the PEM had not been read correctly
When I sign with the key connected to my computer, via Adobe Reader, ONME asks to do the box where the signature will be, and the signature is validated
Thank you for your answers.
Christophe