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

PdfGraphicsAcroFormSignatureField.ContentImage Property

Specifies an image displayed in the signature form field.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v21.1.Drawing.dll


public Image ContentImage { get; set; }

Property Value

Type Description

A Image object that is an image displayed in the signature form field.


If an image for the signature form field is specified using the ContentImage property, the appearance settings of the signature form field (e.g., PdfAcroFormSignatureField.Text, PdfGraphicsAcroFormField.Appearance) will be ignored. In this case, only an image is displayed in the signature field rectangle.

To specify whether an image should be stretched to fill the rectangle of a signature form field, use the PdfGraphicsAcroFormSignatureField.StretchContentImage property.


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