InkAnnotationSettings
6 Jul 20263 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.
Defaults to ’’
author string
specifies the author of the annotation.
Defaults to ‘Guest’
customData object
specifies the custom data of the annotation
Defaults to null
height number
specifies the height of the annotation.
Defaults to 0
isLock boolean
If it is set as true, can’t interact with annotation. Otherwise can interact the annotations. By default it is false.
Defaults to false
isPrint boolean
specifies whether the individual annotations are included or not in print actions.
Defaults to true
offset IPoint
Get or set offset of the annotation.
Defaults to { x: 0, y: 0}
opacity number
Sets the opacity value for ink annotation.By default value is 1. It range varies from 0 to 1.
Defaults to 1
pageNumber number
Get or set page number of the annotation.
Defaults to 1
path string
Gets or sets the path of the ink annotation.
Defaults to ’’
strokeColor string
Sets the stroke color for ink annotation.By default values is #FF0000.
Defaults to ‘#ff0000’
subject string
specifies the subject of the annotation.
Defaults to ’’
thickness number
Sets the thickness for the ink annotation. By default value is 1. It range varies from 1 to 10.
Defaults to 1
width number
specifies the width of the annotation.
Defaults to 0