Skip to main content
All docs
V26.1
  • SignatureWidgetAnnotation Class

    Contains properties that customize the signature field’s widget annotation.

    Namespace: DevExpress.Docs.Pdf

    Assembly: DevExpress.Docs.Pdf.v26.1.dll

    NuGet Package: DevExpress.Docs.Pdf

    Declaration

    public class SignatureWidgetAnnotation :
        WidgetAnnotation

    Example

    How to: Add a Signature Field to a PDF Document

    The following code snippet adds a signature field to a PDF document and binds it to a signature widget:

    DevExpress New PDF API library - Signature Field

    using DevExpress.Docs.Pdf;
    using DevExpress.Drawing.Printing;
    using System.Drawing;
    
    namespace ConsoleApp1;
    
    public class Program {
        public static async Task Main(string[] _) {
            using (PdfDocument pdfDocument = new()) {
                // Add an A4 page to the document.
                Page page = pdfDocument.Pages.Add(DXPaperKind.A4);
    
                // Create a signature field and add it to the field collection.
                SignatureField signatureField = new("signature");
                signatureField.ShowDate = true;
                pdfDocument.Fields.Add(signatureField);
    
                // Bind the signature field to a widget and set widget colors.
                SignatureWidgetAnnotation signatureWidget = new SignatureWidgetAnnotation(signatureField, bounds: new RectangleF(20, 400, 100, 50));
                signatureWidget.OutlineColor = PdfColor.Red;
    
                page.Annotations.Add(signatureWidget);
            }
        }
    }
    

    Implements

    Inheritance

    Object
    BaseAnnotation
    WidgetAnnotation
    SignatureWidgetAnnotation
    See Also