Pdf client sign cert info
-
Hi @jan_blaha, @bjrmatos one question
when the client signs the pdf, how to display the certificate information (serial number, is valid sign, issuer certificate, date valid cert etc..) with html in pdfTnx.
-
Hmm, this is likely done by acrobat, not sure if we have some influence on it.
If I add signature to the pdf, and user signs it, acrobat displays something like this:
-
yes i know that but i need to display part of html only when the client digitally signs the pdf
-
Not sure I get this.
Do you use the pdf utils / pdf sign feature? https://jsreport.net/learn/pdf-utils#pdf-sign
By the client you mean, your app/caller that uses in request bodytemplate.pdfSign.certificateAsset
and you want to embed this information from the provided certificate to the HTML?
-
yes, yust that
-
jsreport doesn't provide this out of the box, but it should be easy to do with jsreport custom script beforeRender hook
https://jsreport.net/learn/scriptsYou can reach there the certificate in base64 form on
template.pdfSign.certificateAsset
Then you can use a custom library or open SSL command-line tool to get the desired information.
https://stackoverflow.com/a/57275782/1660996
And store this information onreq.data.myCertificateInfo...
.
Then you can reach it through templating engines and embed the information to the final pdf.