Some test text!

Sign a documentkeyboard_arrow_down

Sign a PDF document in Node.js

To sign an existing approval signature field in a PDF Document:

const doc = await PDFNet.PDFDoc.createFromURL(filename);

// Add an StdSignatureHandler instance to PDFDoc, making sure to keep track of it using the ID returned.
const sigHandlerId = await doc.addStdSignatureHandlerFromURL(certfile, 'password');

// Obtain the signature form field from the PDFDoc via Annotation.
const sigField = await doc.getField('Signature1');

// Tell PDFNetC to use the SignatureHandler created to sign the new signature form field.
const sigDict = await sigField.useSignatureHandler(sigHandlerId);

// Add more information to the signature dictionary.
await sigDict.putName("SubFilter", "adbe.pkcs7.detached");
await sigDict.putString('Name', 'PDFTron');
await sigDict.putString('Location', 'Vancouver, BC');
await sigDict.putString('Reason', 'Document verification.');

Digitally sign PDF files
Full code sample which demonstrates using the digital signature API to digitally sign and/or certify PDF documents.

linkAbout Adding An Approval Signature to a PDF Document

In addition to supporting e-signatures, the PDFTron SDK also enables certification of an e-signature using a .pfx file, in accordance with the latest PDF specification. By leveraging public key infrastructure (PKI) technology, with a certificate issued by a trusted certificate authority (CA), a signer can use a certificate-based digital ID to guarantee the authenticity of a signature. Placement of a digital signature using a certificate can also guarantee that a document was not modified since the signature was placed, ensuring the authenticity of the document.

Above is an example of a document containing a certified signature, guaranteed by a certificate generated by

Get the answers you need: Support


Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.