user831448
user831448

Reputation: 11

How to add digital signature to pdf

I'm using MPDF library to generate pdf documents, Now I want to add digital signature extension with .pfx file into the pdf document. I searched over the internet most of the suggestion are showing as TCPDF, I don't want to use the TCPDF library. I want to continue with MPDF library for some reason.

Upvotes: 1

Views: 3717

Answers (2)

Diego Vintimilla
Diego Vintimilla

Reputation: 1

is solution con packagist.

$certificate = 'file://'.realpath('/usr/share/nginx/signed/mycert.crt');
$privateKey = 'file://'.realpath('/usr/share/nginx/signed/mykey.key');
$pbx = 'file://'.realpath('/usr/share/nginx/signed/vystup.pfx');
vystup.pfx it's a combination between mycrt.crt file and mykey.key 

In the server execute openssl pkcs12 -export -in uazuay.crt -inkey uazuay.key -out vystup.pfx

Link repository

Upvotes: 0

Finwe
Finwe

Reputation: 6725

mPDF does not support signing documents yet, so you will have to use another solution - either switching libraries, or appending a step to your PDF generation process.

There is an open feature request https://github.com/mpdf/mpdf/issues/389
and a similar SO request add Digital Signature using mPDF object

Upvotes: 1

Related Questions