Skip to content

Commit

Permalink
Si la signature digital échoue on renvoi quand même le pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
wincelau committed Sep 14, 2024
1 parent 45acaf4 commit f040c88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/PDFSignature.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ public static function createPDFFromSvg(array $svgFiles, $outputPdfFile) {
public static function addSvgToPDF($pdfOrigin, $pdfSvg, $pdfOutput, $digitalSignature = true) {
shell_exec(sprintf("pdftk %s multistamp %s output %s", $pdfOrigin, $pdfSvg, $pdfOutput));
if (NSSCryptography::getInstance()->isEnabled() && $digitalSignature) {
NSSCryptography::getInstance()->addSignature($pdfOutput, 'Signed with SignaturePDF');
try {
NSSCryptography::getInstance()->addSignature($pdfOutput, 'Signed with SignaturePDF');
} catch(Exception $e) {
error_log($e->getMessage());
}
}
}

Expand Down

0 comments on commit f040c88

Please sign in to comment.