TX Text Control .NET for Windows Forms

SignatureImage Constructor

Constructor|Introduced in 31.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Initializes a new instance of the SignatureImage class.

Syntax

SignatureImage(string, int)

Initializes a new image from the specified image file and filter.

public SignatureImage(string fileName, int filterIndex);
ParameterDescription
fileName

Specifies the name and the path of the file from which the image is loaded.

filterIndex

Specifies the index of the filter used to load the image. It is an index in the string returned through the ImageCollection.ImportFilters property starting with 1. Possible values are:

ValueDescription
1Windows Bitmap (.BMP)
2Tagged Image Format (.TIF)
3Windows Metafile (.WMF)
4Portable Network Graphics (.PNG)
5JPEG File Interchange Format (.JPG, .JPEG)
6Graphics Interchange Format (.GIF)
7Windows Enhanced Metafile (.EMF)
8Scalable Vector Graphics (.SVG)

SignatureImage(System.Drawing.Image)

Initializes a new image from the specified System.Drawing.Image.

public SignatureImage(System.Drawing.Image image);
ParameterDescription
image

Specifies a System.Drawing.Image object which is used to initialize the signature image.

SignatureImage(MemoryStream)

Initializes a new image from the specified memory stream.

public SignatureImage(MemoryStream stream);
ParameterDescription
stream

Specifies a memory stream from which the data for the signature image is read.

Examples

The following example adds a visible handwritten-signature image to an approval field.

SignatureImage signatureImage = new(@"Images\alex-smith-signature.svg", 0);
SignatureField approval = new(new System.Drawing.Size(3000, 1000), "ApproverSignature", 10) { Image = signatureImage };
textControl.SignatureFields.Add(approval, FrameInsertionMode.AsCharacter);