Forum


Replies: 5   Views: 1942
Signpdf throws errorexception in tcpdf_lib.php:20818
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 iulian-tsf  · 01-06-2020 - 10:57

I managed to get the pdf file signed by adding a check for not empty within TCPDF_lib.php in public static function unichr($c, $unicode = true); if empty => return '';

+ for the openssl issue, I had to make sure the pdf sign method does not look for the cert files within the public app folder: I removed the @realpath($dirname(FILE)).'/' from Phpdocx\Sign\SignPDF lines 103 and 104and left them to  $certificate= 'file://' .$this->_x509Certificate;(from$certificate='file://'.@realpath(dirname(FILE)).'/'.$this->_x509Certificate;).

I don't know if this is a fix or I'm simply avoiding some of your internal checks; but even though this is working for me now, I can't actually use this fix as it will mean changing your product and we'll have issues when you'll release a new version. (we are using phpdocx from a private repository).

Re running the included samples: I get the same issues.

If of any interest, I'm running on Alpine Linux with php 7.4.