HandWrittenSignatureSettings

9 Jul 20263 minutes to read

The HandWrittenSignatureSettings module is used to provide the properties to handwritten signature.

<div id="pdfViewer" style="height: 100%;width: 100%;"></div>
 let viewer: PdfViewer = new PdfViewer();
 // Change the hand written signature settings.
 viewer.handWrittenSignatureSettings = {
     signatureItem: [
         'Signature',
         'Initial'
     ],
     saveSignatureLimit: 1,
     saveInitialLimit: 1,
     opacity: 1,
     strokeColor: '#000000',
     width: 150,
     height: 100,
     thickness: 1,
     offset: { x:0, y:0 },
     pageNumber: 1,
     fontFamily: 'Helvetica',
     canSave: false,
     typeSignatureFonts: ['arial']
     annotationSelectorSettings: {
         selectionBorderColor: '',
         resizerBorderColor: 'black',
         resizerFillColor: '#FF4081',
         resizerSize: 8,
         selectionBorderThickness: 1,
         resizerShape: 'Circle',
         selectorLineDashArray: [],
         resizerLocation: AnnotationResizerLocation.Corners | AnnotationResizerLocation.Edges,
         resizerCursorType: null
     },
     allowedInteractions: ['None'],
     signatureDialogSettings: {
         displayMode: DisplayMode.Draw | DisplayMode.Text | DisplayMode.Upload, hideSaveSignature: false
     },
     initialDialogSettings: {
         displayMode: DisplayMode.Draw | DisplayMode.Text | DisplayMode.Upload,
     hideSaveSignature: false
     }
 };
 viewer.appendTo("#pdfViewer");

Properties

annotationSelectorSettings AnnotationSelectorSettingsModel

specifies the annotation selector settings of the annotation.

Defaults to ’’

canSave boolean

Allows saving of programmatically added signatures.

Defaults to false

fontFamily string

Gets or sets the font family for text signature.

Defaults to ‘Helvetica’

height number

specified the height of the annotation.

Defaults to 100

initialDialogSettings SignatureDialogSettingsModel

Get or set the initialDialogSettings for Handwritten initial.

offset IPoint

Gets or sets the signature offset.

Defaults to {x:0,y:0}

opacity number

specifies the opacity of the annotation.

Defaults to 1

pageNumber number

Gets or sets the signature page number.

Defaults to 1

path string

Gets or sets the path of the signature.

Defaults to ’’

saveInitialLimit number

Gets or sets the save initial limit of the initial. By default value is 1 and maximum limit is 5.

Defaults to 1

saveSignatureLimit number

Gets or sets the save signature limit of the signature. By default value is 1 and maximum limit is 5.

Defaults to 1

signatureDialogSettings SignatureDialogSettingsModel

Get or set the Signature DialogSettings for Handwritten signature.

signatureItem SignatureItem[]

Provide option to define the required signature items to be displayed in signature menu.

Defaults to []

strokeColor string

specifies the stroke color of the annotation.

Defaults to ‘#000000’

thickness number

specified the thickness of the annotation.

Defaults to 1

typeSignatureFonts { [key: number]: string }

Options to set the type signature font name with respective index and maximum font name limit is 4 so key value should be 0 to 3.

width number

specified the width of the annotation.

Defaults to 150