Skip to main content
All docs
V21.2
.NET Framework 4.5.2+

PdfSignatureAppearance Class

Contains signature appearance options.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v21.2.Core.dll

Declaration

public class PdfSignatureAppearance

Remarks

The PdfSignatureAppearance class properties allow you to customize the signature appearance that consists of two components:

appearance elements

  • Signature – a graphic that identifies the signer on the left side of the signature (a photo, scanned signatures and so on).

  • Signature details – data that appears to the right of the signature.

Call the SetImageData method to specify an image displayed on the left side of the signature. If no image is specified, the signer name is displayed. The name is extracted from the signing certificate or the PdfSignatureBuilder.Name property. Set the AppearanceType property to None to display only signature details.

Call the PdfSignatureBuilder.SetSignatureAppearance() method and pass the PdfSignatureAppearance object as a parameter to apply changes to the signature. The SetSignatureAppearance method call discards an image set by the PdfSignatureBuilder.SetImageData() method.

Example

The code sample below customizes the signature appearance:

appearance result

// Apply a signature to an existing form field
var santuzzaSignature = new PdfSignatureBuilder(pkcs7Signature, "Sign");

// Specify an image and signer information
santuzzaSignature.Location = "Australia";
santuzzaSignature.Name = "Santuzza Valentina";
santuzzaSignature.Reason = "I Agree";

// Specify signature appearance parameters:
PdfSignatureAppearance signatureAppearance = new PdfSignatureAppearance();

// Add a signature image:
signatureAppearance.SetImageData("Signing Documents/logo.png");

// Specify what information to display:
signatureAppearance.ShowDate = true;
signatureAppearance.ShowLocation = true;

// Set display format for date and time:
signatureAppearance.DateTimeFormat = "MM/dd/yyyy";


// Change font settings for signature details:
signatureAppearance.SignatureDetailsFont.Size = 12;
signatureAppearance.SignatureDetailsFont.Italic = true;

// Apply changes:
santuzzaSignature.SetSignatureAppearance(signatureAppearance);

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the PdfSignatureAppearance class.

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.

Inheritance

Object
PdfSignatureAppearance
See Also