Some test text!

Sign a document

Sign a PDF document in UWP

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

PDFDoc document = new PDFDoc(inputDocumentPath);

// Retrieve the unsigned approval signature field.
Field foundApprovalField = document.GetField(inputApprovalFieldName);
DigitalSignatureField foundApprovalSignatureDigitalSignatureField = new DigitalSignatureField(foundApprovalField);

// (OPTIONAL) Add more information to the signature dictionary.
foundApprovalSignatureDigitalSignatureField.SetLocation("Vancouver, BC");
foundApprovalSignatureDigitalSignatureField.SetReason("Document approval.");

// (OPTIONAL) Add an appearance to the signature field.
Image image = Image.Create(document.GetSDFDoc(), inputAppearanceImagePath);
SignatureWidget foundApprovalSignatureWidget = new SignatureWidget(foundApprovalField.GetSDFObj());

// Prepare the signature and signature handler for signing.
foundApprovalSignatureDigitalSignatureField.SignOnNextSave(inputPrivateKeyFilePath, inputKeyFilePassword);

// The actual approval signing will be done during the following incremental save operation.
await document.SaveAsync(inputOutPath, SDFDocSaveOptions.e_incremental);

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

About Adding An Approval Signature to a PDF Document

The PDFTron SDK enables approval signatures in PDF documents using a Digital Certificate, 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.

Image taken from PDFTron WebViewer

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

Get the answers you need: Support

Upcoming Webinar: PDFTron SDK Tech Review | Nov 29, 2022 at 2 pm ET


The Platform


© 2022 PDFTron Systems Inc. All rights reserved.


Terms of Use