.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PdfGraphicsAcroFormSignatureField Class

Represents the signature field.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v20.2.Drawing.dll


public class PdfGraphicsAcroFormSignatureField :


To create a signature field, call the PdfGraphicsAcroFormField.CreateSignature method with the specified the field name and field rectangle.

Use members of the PdfGraphicsAcroFormSignatureField class to specify the signature field properties. For example, you can specify the signature field text and content image using PdfGraphicsAcroFormSignatureField.Text, and PdfGraphicsAcroFormSignatureField.ContentImage properties.

To specify the signature field name, tooltip and appearance, use the PdfGraphicsAcroFormField.Name, PdfGraphicsAcroFormField.ToolTip, PdfGraphicsAcroFormField.Appearance properties.

To add a text signature field to PDF graphics, pass a PdfGraphicsAcroFormSignatureField object representing a signature field as a parameter to the PdfGraphics.AddFormField method. To access PdfGraphics, you need to reference the DevExpress.Pdf.Drawing assembly.

To render a page with the PDF graphics, call one of PdfDocumentProcessor.RenderNewPage overloaded methods.


This example shows how to create a signature field and add it to a PDF document using the Document Creation API.

Imports DevExpress.Pdf
Imports System.Drawing

Namespace AddSignatureField
    Friend Class Program
        Shared Sub Main(ByVal args() As String)

            Using processor As New PdfDocumentProcessor()

                ' Create an empty document. 

                ' Create graphics and draw a signature field.
                Using graphics As PdfGraphics = processor.CreateGraphics()

                    ' Render a page with graphics.
                    processor.RenderNewPage(PdfPaperSize.Letter, graphics)
                End Using
            End Using
        End Sub

        Private Shared Sub DrawSignatureField(ByVal graphics As PdfGraphics)

            ' Create a signature field specifying its name and location.
            Dim signature As New PdfGraphicsAcroFormSignatureField("signature", New RectangleF(0, 20, 120, 130))

            ' Specify a content image for the signature field.
            Dim image As Image = System.Drawing.Image.FromFile("..\..\Image.png")
            signature.ContentImage = image

            ' Add the field to the document.
        End Sub
    End Class
End Namespace


See Also