Generate PDF with digital signature by nodejs

2019-04-07 07:30发布

问题:

Recently, i tried to generate pdf by nodejs.

And i finally found the PDFKit.

That library is doing well,but i need to implement the part of digital signature.

But most of implementation are for JAVA or C# like iText or VersyPDF.

Plz give me some suggestion...thx

回答1:

I am currently working on the node-signpdf npm package (at the moment of writing this answer the version is 0.0.3). A readable snippet of PDF generation and signing can be seen in the test code.

I know this answer comes years after the original question but I had pretty hard time figuring all this out so hope this answer helps someone.



回答2:

[disclosure: I work for CoSign]

You can use low level or high level APIs for adding digital signatures to PDF documents.

For a quick and complete integration, check out the CoSign Signature Web Agent.

Updated

If you want to control the UI of the signing process, you can use the CoSign SAPI WebServices API.

Signing using an appliance vs a local certificate: The issue is that storing a digital signature certificate on a PC or server is not recommended since such machines are not Secure Signature Creation Devices (SSCDs). Instead, either a centralized, hardened server (eg CoSign), smart cards, or a SAAS solution is considered best practice. And for regulated industries, an SSCD is often a requirement.

In addition to the security issues, dealing with local certs or smart cards/reader hardware/drivers is an expensive administrative burden. A centralized signing server lowers the TCO.