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.