SignatureFieldSettings

6 Jul 20263 minutes to read

The SignatureFieldSettings module is used to set the properties of signature field in PDF Viewer

<div id="pdfViewer" style="height: 100%;width: 100%;"></div>
 let viewer: PdfViewer = new PdfViewer();
 // Change the signature field settings.
 viewer.signatureFieldSettings = {
     bounds: {x:0, y:0, width:0, height:0},
     name: "",
     isReadOnly: true,
     visibility: "visible",
     isRequired: true,
     isPrint: false,
     tooltip: "",
     thickness: 1,
     pageNumber: 0,
     signatureIndicatorSettings: {
         opacity: 1,
         backgroundColor: "orange",
         width: 19,
         height: 10,
         fontSize: 10,
         text: null,
         color: "black"
     },
     signatureDialogSettings: {
         displayMode: DisplayMode.Draw | DisplayMode.Text | DisplayMode.Upload,
         hideSaveSignature: false
     },
     customData: null,
     typeSignatureFonts: ['arial']
 };
 viewer.appendTo("#pdfViewer");

Properties

bounds IFormFieldBound

Get or set the form field bounds.

Defaults to { x: 0, y: 0, width: 0, height: 0 }

customData object

specifies the custom data of the form fields.

Defaults to null

isPrint boolean

Get or set the boolean value to print the signature field. TRUE by default.

Defaults to false

isReadOnly boolean

Specifies whether the signature field is in read-only or read-write mode. FALSE by default.

Defaults to false

isRequired boolean

If it is set as true, consider as mandatory field in the PDF document. By default it is false.

Defaults to false

name string

Get or set the name of the form field element.

Defaults to ’’

pageNumber number

specifies the page number of the form field.

Defaults to 0

signatureDialogSettings SignatureDialogSettingsModel

Specifies the properties of the signature Dialog Settings in the signature field.

signatureIndicatorSettings SignatureIndicatorSettingsModel

Specifies the properties of the signature indicator in the signature field.

thickness number

Get or set the thickness of the Signature field. Default value is 1. To hide the borders, set the value to 0 (zero).

Defaults to 1

tooltip string

Get or set the text to be displayed as tooltip. By default it is empty.

Defaults to ’’

typeSignatureFonts { [key: number]: string }

Allows setting the font name for typed signatures at specific indices. The maximum number of font names is limited to 4, so the key values should range from 0 to 3.

visibility Visibility

Gets or set the visibility of the form field.

Defaults to ‘visible’