Some test text!

Sign a PDF document

To add an approval signature to a PDF Document with a blank form field prepared for a user to sign.

// Open an existing PDF
PDFDoc doc = new PDFDoc(input_path + input_filename);

// Create a new instance of the SignatureHandler.
DotNetCryptoSignatureHandler sigHandler = new DotNetCryptoSignatureHandler(input_path + certfile, "password");

// Add the SignatureHandler instance to PDFDoc, making sure to keep track of it using the ID returned.
SignatureHandlerId sigHandlerId = doc.AddSignatureHandler(sigHandler);

// Obtain the signature form field from the PDFDoc
Field sigField = doc.GetField("Signature1");

// Tell PDFNet to use the SignatureHandler created to sign the new signature form field.
Obj sigDict = sigField.UseSignatureHandler(sigHandlerId);

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

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

Get the answers you need: Support