.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

PdfGraphicsAcroFormSignatureField Class

Represents the signature field.

Namespace: DevExpress.Pdf

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

Declaration

public class PdfGraphicsAcroFormSignatureField :
    PdfGraphicsAcroFormCommonField
Public Class PdfGraphicsAcroFormSignatureField
    Inherits PdfGraphicsAcroFormCommonField
public class PdfGraphicsAcroFormSignatureField :
    PdfGraphicsAcroFormCommonField
Public Class PdfGraphicsAcroFormSignatureField
    Inherits PdfGraphicsAcroFormCommonField
public class PdfGraphicsAcroFormSignatureField :
    PdfGraphicsAcroFormCommonField
Public Class PdfGraphicsAcroFormSignatureField
    Inherits PdfGraphicsAcroFormCommonField

Remarks

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.

Examples

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. 
                processor.CreateEmptyDocument("..\..\Result.pdf")

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

                    ' 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.
            graphics.AddFormField(signature)
        End Sub
    End Class
End Namespace

Inheritance

See Also