officefileapi-devexpress-dot-pdf-dot-pdfsignaturebuilder-dot-setimagedata-x28-system-dot-byte-x29.md
Sets the signature’s image data.
Namespace : DevExpress.Pdf
Assembly : DevExpress.Pdf.v25.2.Core.dll
NuGet Package : DevExpress.Pdf.Core
public void SetImageData(
byte[] imageData
)
Public Sub SetImageData(
imageData As Byte()
)
| Name | Type | Description |
|---|---|---|
| imageData | Byte[] |
A byte array that represents image data.
|
Use the PdfSignatureFieldInfo.SignatureBounds property to specify the signature location. If the SignatureBounds property is not specified, the signature is not visible.
The PDF Document API supports the signature image data in the following formats:
If the signature image is not provided, the signature is transparent.
The following code snippets (auto-collected from DevExpress Examples) contain references to the SetImageData(Byte[]) method.
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#L30
//Specify the image and signer information:
signatureBuilder.SetImageData(System.IO.File.ReadAllBytes("signature.jpg"));
signatureBuilder.Location = "LOCATION";
pdf-document-api-custom-tsa-client/CS/CustomTsaClient/Program.cs#L27
//Specify image data and signer information:
signatureBuilder.SetImageData(File.ReadAllBytes("JaneCooper.jpg"));
signatureBuilder.Location = "United Kingdom";
pdf-document-api-sign-documents-with-certificate/CS/SignPDFWithHardwareCertificate/Program.cs#L59
var cooperSignature = new PdfSignatureBuilder(pkcs7Signature, signatureFieldInfo);
cooperSignature.SetImageData(System.IO.File.ReadAllBytes("JaneCooper.jpg"));
pdf-document-api-custom-signer/VB/CustomSigner/Program.vb#L30
'Specify the image and signer information:
signatureBuilder.SetImageData(System.IO.File.ReadAllBytes("signature.jpg"))
signatureBuilder.Location = "LOCATION"
pdf-document-api-custom-tsa-client/VB/CustomTsaClient/Program.vb#L25
'Specify image data and signer information:
signatureBuilder.SetImageData(File.ReadAllBytes("JaneCooper.jpg"))
signatureBuilder.Location = "United Kingdom"
' Specify an image and signer information:
signatureBuilder.SetImageData(System.IO.File.ReadAllBytes("signature.jpg"))
signatureBuilder.Location = "LOCATION"
pdf-document-api-sign-documents-with-certificate/VB/SignPDFWithHardwareCertificate/Program.vb#L46
Dim cooperSignature = New PdfSignatureBuilder(pkcs7Signature, signatureFieldInfo)
cooperSignature.SetImageData(File.ReadAllBytes("JaneCooper.jpg"))
' Sign and save the document
See Also