InkAnnotationSettings

23 Sep 20252 minutes to read

The Ink module is used to provide the properties to Ink annotation.

<div id="pdfViewer" style="height: 100%;width: 100%;"></div>
 let viewer: PdfViewer = new PdfViewer();
 // Change the ink annotation settings.
 viewer.inkAnnotationSettings = {
     offset: { x:0, y:0 },
     pageNumber: 1,
     width: 0,
     height: 0,
     path: '',
     author: 'Guest',
     opacity: 1,
     strokeColor: '#ff0000',
     thickness: 1,
     annotationSelectorSettings: {
         selectionBorderColor: '',
         resizerBorderColor: 'black',
         resizerFillColor: '#FF4081',
         resizerSize: 8,
         selectionBorderThickness: 1,
         resizerShape: 'Circle',
         selectorLineDashArray: [],
         resizerLocation: AnnotationResizerLocation.Corners | AnnotationResizerLocation.Edges,
         resizerCursorType: null
     },
     isLock: false,
     customData: null,
     allowedInteractions: ['None'],
     isPrint: true,
     subject: ''
 };
 viewer.appendTo("#pdfViewer");

Properties

allowedInteractions AllowedInteraction[]

Gets or sets the allowed interactions for the locked ink annotations.
IsLock can be configured using ink settings.

Defaults to [‘None’]

annotationSelectorSettings AnnotationSelectorSettingsModel

Define the default option to customize the selector for ink annotation.

author string

specifies the author of the annotation.

customData object

specifies the custom data of the annotation

height number

specifies the height of the annotation.

isLock boolean

If it is set as true, can’t interact with annotation. Otherwise can interact the annotations. By default it is false.

isPrint boolean

specifies whether the individual annotations are included or not in print actions.

offset IPoint

Get or set offset of the annotation.

opacity number

Sets the opacity value for ink annotation.By default value is 1. It range varies from 0 to 1.

pageNumber number

Get or set page number of the annotation.

path string

Gets or sets the path of the ink annotation.

strokeColor string

Sets the stroke color for ink annotation.By default values is #FF0000.

subject string

specifies the subject of the annotation.

thickness number

Sets the thickness for the ink annotation. By default value is 1. It range varies from 1 to 10.

width number

specifies the width of the annotation.