

View Example: How to use Azure Key Vault API to sign a PDF document You can create the Pkcs7SignerBase descendant and use a custom PKCS#7 signature builder: Signer.SaveDocument("SignedDocument.pdf", signatures) SantuzzaSignature.Name = "Santuzza Valentina" SantuzzaSignature.Location = "Australia" SantuzzaSignature.SetImageData(File.ReadAllBytes("Signing Documents//SantuzzaValentina.jpg")) Var santuzzaSignature = new PdfSignatureBuilder(pkcs7Signature, "Sign") Apply a signature to an existing form field: Specify an image and signer information:ĬooperSignature.SetImageData(File.ReadAllBytes("Signing Documents//JaneCooper.jpg")) ĬooperSignature.Reason = "Acknowledgement" Var cooperSignature = new PdfSignatureBuilder(pkcs7Signature, signatureFieldInfo) Apply a signature to a newly created signature field: Pkcs7Signer pkcs7Signature = new Pkcs7Signer("Signing Documents/certificate.pfx", "123", Using (var signer = new PdfDocumentSigner("Document.pdf"))
Sign pdf signature free code#
The code sample below applies a digital signature to a new and existing form field and signs a document with these signatures: Refer to the previous section for a code sample.Īpplies the signature(s) and saves the document. Use the PdfSignatureFieldInfo object to create a new form field. If the field with the specified name does not exist, an ArgumentException is thrown. Specify the signature field’s name in the object’s constructor to sign this field. Use the HashAlgorithmType enumeration to specify the signatures hashing algorithm.Īpplies a signature to a form field.
Sign pdf signature free password#
Specify the signature certificate and password in the object’s constructor. Pass the document to sign to the object’s constructor.Ĭreates a PKCS#7 signature. The table below lists API used to sign a form field: API The PdfDocumentSigner class allows you to sign and save a document.

The PDF Document API supports PKCS#7 signatures with X.509 certificates and document-level time timestamps. Use the PdfSignatureBuilder class to apply a signature to the form field. SignatureFieldInfo.RotationAngle = PdfAcroFormFieldRotation.Rotate90 SignatureFieldInfo.SignatureBounds = New PdfRectangle(10, 10, 150, 150) SignatureFieldInfo.Name = "SignatureField" ' Specify the field's name, location and rotation angle: ' Create a signature field on the first page:ĭim signatureFieldInfo = New PdfSignatureFieldInfo(1)

SignatureFieldInfo.SignatureBounds = new PdfRectangle(10, 10, 150, 150) Specify the field's name, location and rotation angle: Var signatureFieldInfo = new PdfSignatureFieldInfo(1) Create a signature field on the first page:
