officefileapi-devexpress-dot-pdf-dot-pdfsignaturefieldinfo-2507f9e3.md
Gets or sets the signature field’s bounds on the page (measured in the page coordinate system).
Namespace : DevExpress.Pdf
Assembly : DevExpress.Pdf.v25.2.Core.dll
NuGet Package : DevExpress.Pdf.Core
public PdfRectangle SignatureBounds { get; set; }
Public Property SignatureBounds As PdfRectangle
| Type | Description |
|---|---|
| PdfRectangle |
A rectangle that defines the signature’s location.
|
Use the PdfSignatureBuilder.SetImageData method to add an image to the signature field.
If the SignatureBounds is not specified, the signature field is hidden.
using DevExpress.Pdf;
using DevExpress.Office.DigitalSignatures;
/ /Load a document to be signed
using (var signer = new PdfDocumentSigner("SignedDocument.pdf"))
{
// Specify the name and location of the signature field
var description = new PdfSignatureFieldInfo(1);
description.Name = "SignatureField";
description.SignatureBounds = new PdfRectangle(10, 10, 150, 150);
// Create a PKCS#7 signature
Pkcs7Signer signature = new Pkcs7Signer("Signing Documents//testcert.pfx", "123", HashAlgorithmType.SHA256);
// Apply a signature to a new form field
var signatureBuilder = new PdfSignatureBuilder(signature, description);
// Specify the signature's image and signer information
signatureBuilder.SetImageData(System.IO.File.ReadAllBytes("Signing Documents//Signature.jpg"));
signatureBuilder.Location = "USA";
signatureBuilder.Name = "Jane Cooper";
// Sign and save the document
signer.SaveDocument("out2.pdf", signatureBuilder);
}
Imports DevExpress.Pdf
Imports DevExpress.Office.DigitalSignatures
' Load a document to be signed
Using signer = New PdfDocumentSigner("SignedDocument.pdf")
'Specify the name and location of the signature field
Dim description = New PdfSignatureFieldInfo(1)
description.Name = "SignatureField"
description.SignatureBounds = New PdfRectangle(10, 10, 150, 150)
'Create a PKCS#7 signature
Dim signature As Pkcs7Signer = New Pkcs7Signer("Signing Documents//testcert.pfx", "123", HashAlgorithmType.SHA256)
'Apply a signature to a new form field
Dim signatureBuilder = New PdfSignatureBuilder(signature, description)
'Specify the signature's image and signer information
signatureBuilder.SetImageData(System.IO.File.ReadAllBytes("Signing Documents//Signature.jpg"))
signatureBuilder.Location = "USA"
signatureBuilder.Name = "Jane Cooper"
'Sign and save the document
signer.SaveDocument("out2.pdf", signatureBuilder)
End Using
The following code snippets (auto-collected from DevExpress Examples) contain references to the SignatureBounds property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
pdf-document-api-custom-signer/CS/CustomSigner/Program.cs#L21
description.Name = "SignatureField";
description.SignatureBounds = new PdfRectangle(10, 10, 50, 150);
pdf-document-api-sign-documents-with-certificate/CS/SignPDFWithHardwareCertificate/Program.cs#L55
signatureFieldInfo.Name = "SignatureField";
signatureFieldInfo.SignatureBounds = new PdfRectangle(20, 20, 150, 150);
pdf-document-api-custom-signer/VB/CustomSigner/Program.vb#L21
description.Name = "SignatureField"
description.SignatureBounds = New PdfRectangle(10, 10, 50, 150)
description.Name = "SignatureField"
description.SignatureBounds = New PdfRectangle(10, 10, 50, 150)
pdf-document-api-sign-documents-with-certificate/VB/SignPDFWithHardwareCertificate/Program.vb#L43
signatureFieldInfo.Name = "SignatureField"
signatureFieldInfo.SignatureBounds = New PdfRectangle(20, 20, 150, 150)
' Apply a signature to a newly created signature field
See Also