Hello,
Please try running the included samples (examples/DigitalSignature/signPDF) using PHP CLI mode to check if they works on your server.
Also please send to contact[at]phpdocx.com the PDF document that returns the error, so we can check it.
About your question, the PEM file used to sign the document needs to contain all information (certification and private key), as https://www.phpdocx.com/documentation/introduction/digital-signature-docx-pdf-PHP details. Maybe the PEM file you are using doesn't contain some of the required information? Or OpenSSL can't read it? Please try using the PEM file included in the package as sample ('examples/files/Test.pem').
Regards.