UNPKG

@syncfusion/ej2-pdfviewer

Version:
2,207 lines (1,761 loc) 131 kB
import { Component, INotifyPropertyChanged, NotifyPropertyChanges, ChildProperty, L10n, Collection, Complex, isBlazor, Browser } from '@syncfusion/ej2-base';import { ModuleDeclaration, isNullOrUndefined, Property, Event, EmitType, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { IAnnotationPoint, IPoint, PdfViewerBase, PdfiumRunner, TextMarkupAnnotation } from './index';import { Navigation } from './index';import { Magnification } from './index';import { Toolbar } from './index';import { ToolbarItem } from './index';import { PdfRenderer } from './index';import { LinkTarget, InteractionMode, SignatureFitMode, AnnotationType, AnnotationToolbarItem, LineHeadStyle, ContextMenuAction, FontStyle, TextAlignment, AnnotationResizerShape, AnnotationResizerLocation, ZoomMode, PrintMode, CursorType, ContextMenuItem, DynamicStampItem, SignStampItem, StandardBusinessStampItem, FormFieldType, AllowedInteraction, AnnotationDataFormat, SignatureType, CommentStatus, SignatureItem, FormDesignerToolbarItem, DisplayMode, Visibility, FormFieldDataFormat, PdfKeys, ModifierKeys, ExtractTextOption } from './base/types';import { Annotation } from './index';import { LinkAnnotation } from './index';import { ThumbnailView } from './index';import { BookmarkView } from './index';import { TextSelection } from './index';import { TextSearch } from './index';import { AccessibilityTags } from './index';import { FormFields } from './index';import { FormDesigner } from './index';import { Print, CalibrationUnit } from './index';import { PageOrganizer } from './index';import { UnloadEventArgs, LoadEventArgs, LoadFailedEventArgs, AjaxRequestFailureEventArgs, PageChangeEventArgs, PageClickEventArgs, ZoomChangeEventArgs, HyperlinkClickEventArgs, HyperlinkMouseOverArgs, ImportStartEventArgs, ImportSuccessEventArgs, ImportFailureEventArgs, ExportStartEventArgs, ExportSuccessEventArgs, ExportFailureEventArgs, AjaxRequestInitiateEventArgs, PageRenderInitiateEventArgs, AjaxRequestSuccessEventArgs, PageRenderCompleteEventArgs, PageOrganizerSaveAsEventArgs } from './index';import { AnnotationAddEventArgs, AnnotationRemoveEventArgs, AnnotationPropertiesChangeEventArgs, AnnotationResizeEventArgs, AnnotationSelectEventArgs, AnnotationMoveEventArgs, AnnotationDoubleClickEventArgs, AnnotationMouseoverEventArgs, PageMouseoverEventArgs, AnnotationMouseLeaveEventArgs , ButtonFieldClickEventArgs} from './index';import { TextSelectionStartEventArgs, TextSelectionEndEventArgs, DownloadStartEventArgs, DownloadEndEventArgs, ExtractTextCompletedEventArgs, PrintStartEventArgs, PrintEndEventArgs } from './index';import { TextSearchStartEventArgs, TextSearchCompleteEventArgs, TextSearchHighlightEventArgs } from './index';import { CustomContextMenuSelectEventArgs, CustomContextMenuBeforeOpenEventArgs } from './index';import { PdfAnnotationBase, PdfFormFieldBase, ZOrderPageTable } from './drawing/pdf-annotation';import { PdfAnnotationBaseModel, PdfFormFieldBaseModel } from './drawing/pdf-annotation-model';import { Drawing, ClipBoardObject } from './drawing/drawing';import { Selector } from './drawing/selector';import { SelectorModel } from './drawing/selector-model';import { PointModel, IElement, Rect, Point, Size, processPathData, splitArrayCollection } from '@syncfusion/ej2-drawings';import { renderAdornerLayer } from './drawing/dom-util';import { ThumbnailClickEventArgs } from './index';import { ValidateFormFieldsArgs, BookmarkClickEventArgs, AnnotationUnSelectEventArgs, BeforeAddFreeTextEventArgs, FormFieldFocusOutEventArgs, CommentEventArgs, FormFieldClickArgs, FormFieldAddArgs, FormFieldRemoveArgs, FormFieldPropertiesChangeArgs, FormFieldMouseLeaveArgs, FormFieldMouseoverArgs, FormFieldMoveArgs, FormFieldResizeArgs, FormFieldSelectArgs, FormFieldUnselectArgs, FormFieldDoubleClickArgs, AnnotationMovingEventArgs, KeyboardCustomCommandsEventArgs, ISize } from './base';import { AddSignatureEventArgs, RemoveSignatureEventArgs, MoveSignatureEventArgs, SignaturePropertiesChangeEventArgs, ResizeSignatureEventArgs, SignatureSelectEventArgs, SignatureUnselectEventArgs } from './base';import { IFormField, IFormFieldBound } from './form-designer/form-designer';import { ClickEventArgs, MenuItemModel } from '@syncfusion/ej2-navigations';import { PdfViewerUtils, PdfiumTaskScheduler, TaskPriorityLevel } from './base/pdfviewer-utlis'; import {IAjaxHeaders,IPdfRectBounds} from "./pdfviewer"; import {ComponentModel} from '@syncfusion/ej2-base'; /** * Interface for a class ToolbarSettings */ export interface ToolbarSettingsModel { /** * Enable or disables the toolbar of PdfViewer. */ showTooltip?: boolean; /** * shows only the defined options in the PdfViewer. */ toolbarItems?: (CustomToolbarItemModel | ToolbarItem)[]; /** * Provide option to customize the annotation toolbar of the PDF Viewer. */ annotationToolbarItems?: AnnotationToolbarItem[]; /** * Customize the tools to be exposed in the form designer toolbar. */ formDesignerToolbarItems?: FormDesignerToolbarItem[]; } /** * Interface for a class CustomToolbarItem */ export interface CustomToolbarItemModel { /** * Defines single/multiple classes separated by space used to specify an icon for the button. * The icon will be positioned before the text content if text is available, otherwise the icon alone will be rendered. */ prefixIcon?: string; /** * Specifies the text to be displayed on the Toolbar button. */ tooltipText?: string; /** * Specifies the unique ID to be used with button or input element of Toolbar items. */ id?: string; /** * Specifies the text to be displayed on the Toolbar button. */ text?: string; /** * Defines single/multiple classes (separated by space) to be used for customization of commands. */ cssClass?: string; /** * Define which side(right/left) to use for customizing the icon. */ align?: string; /** * Specifies the HTML element/element ID as a string that can be added as a Toolbar command. */ template?: string | object | Function; /** * Specify the type or category of the Toolbar item. */ type?: string; } /** * Interface for a class AjaxRequestSettings */ export interface AjaxRequestSettingsModel { /** * set the ajax Header values in the PdfViewer. */ ajaxHeaders?: IAjaxHeaders[]; /** * set the ajax credentials for the pdfviewer. */ withCredentials?: boolean; } /** * Interface for a class CustomStamp */ export interface CustomStampModel { /** * Defines the custom stamp name to be added in stamp menu of the PDF Viewer toolbar. */ customStampName?: string; /** * Defines the custom stamp images source to be added in stamp menu of the PDF Viewer toolbar. */ customStampImageSource?: string; } /** * Interface for a class AnnotationToolbarSettings */ export interface AnnotationToolbarSettingsModel { /** * Enable or disables the tooltip of the toolbar. */ showTooltip?: boolean; /** * shows only the defined options in the PdfViewer. */ annotationToolbarItem?: AnnotationToolbarItem[]; } /** * Interface for a class FormDesignerToolbarSettings */ export interface FormDesignerToolbarSettingsModel { /** * Enable or disables the tooltip of the toolbar. */ showTooltip?: boolean; /** * shows only the defined options in the PdfViewer. */ formDesignerToolbarItem?: FormDesignerToolbarItem[]; } /** * Interface for a class SignatureFieldSettings */ export interface SignatureFieldSettingsModel { /** * Get or set the form field bounds. */ bounds?: IFormFieldBound; /** * Get or set the name of the form field element. */ name?: string; /** * Specifies whether the signature field is in read-only or read-write mode. FALSE by default. */ isReadOnly?: boolean; /** * Gets or set the visibility of the form field. */ visibility?: Visibility; /** * If it is set as true, consider as mandatory field in the PDF document. By default it is false. */ isRequired?: boolean; /** * Get or set the boolean value to print the signature field. TRUE by default. */ isPrint?: boolean; /** * Get or set the text to be displayed as tooltip. By default it is empty. */ tooltip?: string; /** * Get or set the thickness of the Signature field. Default value is 1. To hide the borders, set the value to 0 (zero). */ thickness?: number; /** * specifies the page number of the form field. */ pageNumber?: number; /** * Specifies the properties of the signature Dialog Settings in the signature field. */ signatureDialogSettings?: SignatureDialogSettingsModel; /** * Specifies the properties of the signature indicator in the signature field. */ signatureIndicatorSettings?: SignatureIndicatorSettingsModel; /** * specifies the custom data of the form fields. */ customData?: object; /** * 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. */ typeSignatureFonts?: { [key: number]: string }; } /** * Interface for a class InitialFieldSettings */ export interface InitialFieldSettingsModel { /** * Get or set the form field bounds. */ bounds?: IFormFieldBound; /** * Get or set the name of the form field element. */ name?: string; /** * Specifies whether the initial field is in read-only or read-write mode. FALSE by default. */ isReadOnly?: boolean; /** * Gets or set the visibility of the form field. */ visibility?: Visibility; /** * If it is set as true, consider as mandatory field in the PDF document. By default it is false. */ isRequired?: boolean; /** * Get or set the boolean value to print the initial field. TRUE by default. */ isPrint?: boolean; /** * Get or set the text to be displayed as tooltip. By default it is empty. */ tooltip?: string; /** * Get or set the thickness of the Initial field. Default value is 1. To hide the borders, set the value to 0 (zero). */ thickness?: number; /** * specifies the page number of the form field. */ pageNumber?: number; /** * Gets or sets the initial field type of the signature field. */ isInitialField?: boolean; /** * Get or set the signature dialog settings for initial field. */ initialDialogSettings?: SignatureDialogSettingsModel; /** * Specifies the properties of the signature indicator in the initial field. */ initialIndicatorSettings?: SignatureIndicatorSettingsModel; /** * specifies the custom data of the form fields. */ customData?: object; /** * Allows setting the font name for typed initials at specific indices. The maximum number of font names is limited to 4, so the key values should range from 0 to 3. */ typeInitialFonts?: { [key: number]: string }; } /** * Interface for a class SignatureIndicatorSettings */ export interface SignatureIndicatorSettingsModel { /** * Specifies the opacity of the signature indicator. */ opacity?: number; /** * Specifies the color of the signature indicator. */ backgroundColor?: string; /** * Specifies the width of the signature indicator. Maximum width is half the width of the signature field. * Minimum width is the default value. */ width?: number; /** * Specifies the height of the signature indicator. Maximum height is half the height of the signature field. * Minimum height is the default value. */ height?: number; /** * Specifies the signature Indicator's font size. The maximum size of the font is half the height of the signature field. */ fontSize?: number; /** * Specifies the text of the signature Indicator. */ text?: string; /** * Specifies the color of the text of signature indicator. */ color?: string; } /** * Interface for a class SignatureDialogSettings */ export interface SignatureDialogSettingsModel { /** * Get or set the required signature options will be enabled in the signature dialog. */ displayMode?: DisplayMode; /** * Get or set a boolean value to show or hide the save signature check box option in the signature dialog. FALSE by default. */ hideSaveSignature?: boolean; } /** * Interface for a class ServerActionSettings */ export interface ServerActionSettingsModel { /** * specifies the load action of PdfViewer. */ load?: string; /** * specifies the unload action of PdfViewer. */ unload?: string; /** * specifies the render action of PdfViewer. */ renderPages?: string; /** * specifies the print action of PdfViewer. */ print?: string; /** * specifies the download action of PdfViewer. */ download?: string; /** * specifies the download action of PdfViewer. */ renderThumbnail?: string; /** * specifies the annotation comments action of PdfViewer. */ renderComments?: string; /** * specifies the imports annotations action of PdfViewer. */ importAnnotations?: string; /** * specifies the export annotations action of PdfViewer. */ exportAnnotations?: string; /** * specifies the imports action of PdfViewer. */ importFormFields?: string; /** * specifies the export action of PdfViewer. */ exportFormFields?: string; /** * specifies the export action of PdfViewer. */ renderTexts?: string; /** * Specifies the password validation action of PDF Viewer. */ validatePassword?: string; } /** * Interface for a class StrikethroughSettings */ export interface StrikethroughSettingsModel { /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the color of the annotation. */ color?: string; /** * specifies the author of the annotation. */ author?: string; /** * specifies the annotation selector settings of the annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * specifies the custom data of the annotation. */ customData?: object; /** * specifies the locked action of the annotation. */ isLock?: boolean; /** * Enables or disables the multi-page text markup annotation selection in UI. * * @default false */ enableMultiPageAnnotation?: boolean; /** * Enable or disable the text markup resizer to modify the bounds in UI. * * @default false */ enableTextMarkupResizer?: boolean; /** * Gets or sets the allowed interactions for the locked strikethrough annotations. * IsLock can be configured using strikethrough settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class UnderlineSettings */ export interface UnderlineSettingsModel { /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the color of the annotation. */ color?: string; /** * specifies the author of the annotation. */ author?: string; /** * specifies the annotation selector settings of the annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * specifies the custom data of the annotation. */ customData?: object; /** * specifies the locked action of the annotation. */ isLock?: boolean; /** * Enables or disables the multi-page text markup annotation selection in UI. * * @default false */ enableMultiPageAnnotation?: boolean; /** * Enable or disable the text markup resizer to modify the bounds in UI. * * @default false */ enableTextMarkupResizer?: boolean; /** * Gets or sets the allowed interactions for the locked underline annotations. * IsLock can be configured using underline settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class HighlightSettings */ export interface HighlightSettingsModel { /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the color of the annotation. */ color?: string; /** * specifies the author of the annotation. */ author?: string; /** * specifies the annotation selector settings of the annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * specifies the custom data of the annotation. */ customData?: object; /** * specifies the locked action of the annotation. */ isLock?: boolean; /** * Enables or disables the multi-page text markup annotation selection in UI. * * @default false */ enableMultiPageAnnotation?: boolean; /** * Enable or disable the text markup resizer to modify the bounds in UI. * * @default false */ enableTextMarkupResizer?: boolean; /** * Gets or sets the allowed interactions for the locked highlight annotations. * IsLock can be configured using highlight settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class LineSettings */ export interface LineSettingsModel { /** * Get or set offset of the annotation. */ offset?: IPoint; /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the fill color of the annotation. */ fillColor?: string; /** * specifies the stroke color of the annotation. */ strokeColor?: string; /** * specifies the author of the annotation. */ author?: string; /** * specified the thickness of the annotation. */ thickness?: number; /** * specifies the line head start style of the annotation. */ lineHeadStartStyle?: LineHeadStyle; /** * specifies the line head end style of the annotation. */ lineHeadEndStyle?: LineHeadStyle; /** * specifies the border dash array of the annotation. */ borderDashArray?: number; /** * specifies the annotation selector settings of the annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * specifies the minHeight of the annotation. */ minHeight?: number; /** * specifies the minWidth of the annotation. */ minWidth?: number; /** * specifies the minHeight of the annotation. */ maxHeight?: number; /** * specifies the maxWidth of the annotation. */ maxWidth?: number; /** * specifies the locked action of the annotation. */ isLock?: boolean; /** * specifies the custom data of the annotation. */ customData?: object; /** * Gets or sets the allowed interactions for the locked highlight annotations. * IsLock can be configured using line settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class ArrowSettings */ export interface ArrowSettingsModel { /** * Get or set offset of the annotation. */ offset?: IPoint; /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the fill color of the annotation. */ fillColor?: string; /** * specifies the stroke color of the annotation. */ strokeColor?: string; /** * specifies the author of the annotation. */ author?: string; /** * specified the thickness of the annotation. */ thickness?: number; /** * specifies the line head start style of the annotation. */ lineHeadStartStyle?: LineHeadStyle; /** * specifies the line head start style of the annotation. */ lineHeadEndStyle?: LineHeadStyle; /** * specifies the border dash array of the annotation. */ borderDashArray?: number; /** * specifies the annotation selector settings of the annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * specifies the minHeight of the annotation. */ minHeight?: number; /** * specifies the minWidth of the annotation. */ minWidth?: number; /** * specifies the minHeight of the annotation. */ maxHeight?: number; /** * specifies the maxWidth of the annotation. */ maxWidth?: number; /** * specifies the locked action of the annotation. */ isLock?: boolean; /** * specifies the custom data of the annotation. */ customData?: object; /** * Gets or sets the allowed interactions for the locked arrow annotations. * IsLock can be configured using arrow settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class RectangleSettings */ export interface RectangleSettingsModel { /** * Get or set offset of the annotation. */ offset?: IPoint; /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the width of the annotation. */ width?: number; /** * specifies the height of the annotation. */ height?: number; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the fill color of the annotation. */ fillColor?: string; /** * specifies the stroke color of the annotation. */ strokeColor?: string; /** * specifies the author of the annotation. */ author?: string; /** * specified the thickness of the annotation. */ thickness?: number; /** * specifies the annotation selector settings of the annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * specifies the minHeight of the annotation. */ minHeight?: number; /** * specifies the minWidth of the annotation. */ minWidth?: number; /** * specifies the minHeight of the annotation. */ maxHeight?: number; /** * specifies the maxWidth of the annotation. */ maxWidth?: number; /** * specifies the locked action of the annotation. */ isLock?: boolean; /** * specifies the custom data of the annotation. */ customData?: object; /** * Gets or sets the allowed interactions for the locked rectangle annotations. * IsLock can be configured using rectangle settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class CircleSettings */ export interface CircleSettingsModel { /** * Get or set offset of the annotation. */ offset?: IPoint; /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the width of the annotation. */ width?: number; /** * specifies the height of the annotation. */ height?: number; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the fill color of the annotation. */ fillColor?: string; /** * specifies the stroke color of the annotation. */ strokeColor?: string; /** * specifies the author of the annotation. */ author?: string; /** * specified the thickness of the annotation. */ thickness?: number; /** * specifies the annotation selector settings of the annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * specifies the minHeight of the annotation. */ minHeight?: number; /** * specifies the minWidth of the annotation. */ minWidth?: number; /** * specifies the minHeight of the annotation. */ maxHeight?: number; /** * specifies the maxWidth of the annotation. */ maxWidth?: number; /** * specifies the locked action of the annotation. */ isLock?: boolean; /** * specifies the custom data of the annotation. */ customData?: object; /** * Gets or sets the allowed interactions for the locked circle annotations. * IsLock can be configured using circle settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class ShapeLabelSettings */ export interface ShapeLabelSettingsModel { /** * specifies the opacity of the label. */ opacity?: number; /** * specifies the fill color of the label. */ fillColor?: string; /** * specifies the border color of the label. */ fontColor?: string; /** * specifies the font size of the label. */ fontSize?: number; /** * specifies the max-width of the label. */ fontFamily?: string; /** * specifies the default content of the label. */ labelContent?: string; /** * specifies the default content of the label. */ notes?: string; } /** * Interface for a class PolygonSettings */ export interface PolygonSettingsModel { /** * Get or set offset of the annotation. */ offset?: IPoint; /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the fill color of the annotation. */ fillColor?: string; /** * specifies the stroke color of the annotation. */ strokeColor?: string; /** * specifies the author of the annotation. */ author?: string; /** * specified the thickness of the annotation. */ thickness?: number; /** * specifies the annotation selector settings of the annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * specifies the minHeight of the annotation. */ minHeight?: number; /** * specifies the minWidth of the annotation. */ minWidth?: number; /** * specifies the minHeight of the annotation. */ maxHeight?: number; /** * specifies the maxWidth of the annotation. */ maxWidth?: number; /** * specifies the locked action of the annotation. */ isLock?: boolean; /** * specifies the custom data of the annotation. */ customData?: object; /** * Gets or sets the allowed interactions for the locked polygon annotations. * IsLock can be configured using polygon settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class StampSettings */ export interface StampSettingsModel { /** * Get or set offset of the annotation. */ offset?: IPoint; /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the width of the annotation. */ width?: number; /** * specifies the height of the annotation. */ height?: number; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the author of the annotation. */ author?: string; /** * specifies the annotation selector settings of the annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * specifies the minHeight of the annotation. */ minHeight?: number; /** * specifies the minWidth of the annotation. */ minWidth?: number; /** * specifies the minHeight of the annotation. */ maxHeight?: number; /** * specifies the maxWidth of the annotation. */ maxWidth?: number; /** * specifies the locked action of the annotation. */ isLock?: boolean; /** * specifies the custom data of the annotation. */ customData?: object; /** * Provide option to define the required dynamic stamp items to be displayed in annotation toolbar menu. */ dynamicStamps?: DynamicStampItem[]; /** * Provide option to define the required sign stamp items to be displayed in annotation toolbar menu. */ signStamps?: SignStampItem[]; /** * Provide option to define the required standard business stamp items to be displayed in annotation toolbar menu. */ standardBusinessStamps?: StandardBusinessStampItem[]; /** * Gets or sets the allowed interactions for the locked stamp annotations. * IsLock can be configured using stamp settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class CustomStampSettings */ export interface CustomStampSettingsModel { /** * Get or set offset of the annotation. */ offset?: IPoint; /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the author of the annotation. */ author?: string; /** * specifies the width of the annotation. */ width?: number; /** * specifies the height of the annotation. */ height?: number; /** * specifies the left position of the annotation. */ left?: number; /** * specifies the top position of the annotation. */ top?: number; /** * Specifies to maintain the newly added custom stamp element in the menu items. */ isAddToMenu?: boolean; /** * specifies the minHeight of the annotation. */ minHeight?: number; /** * specifies the minWidth of the annotation. */ minWidth?: number; /** * specifies the minHeight of the annotation. */ maxHeight?: number; /** * specifies the maxWidth of the annotation. */ maxWidth?: number; /** * specifies the locked action of the annotation. */ isLock?: boolean; /** * Define the custom image path and it's name to be displayed in the menu items. */ customStamps?: CustomStampModel[]; /** * If it is set as false. then the custom stamp items won't be visible in the annotation toolbar stamp menu items. */ enableCustomStamp?: boolean; /** * Gets or sets the allowed interactions for the locked custom stamp annotations. * IsLock can be configured using custom stamp settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class DistanceSettings */ export interface DistanceSettingsModel { /** * Get or set offset of the annotation. */ offset?: IPoint; /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the fill color of the annotation. */ fillColor?: string; /** * specifies the stroke color of the annotation. */ strokeColor?: string; /** * specifies the author of the annotation. */ author?: string; /** * specified the thickness of the annotation. */ thickness?: number; /** * specifies the line head start style of the annotation. */ lineHeadStartStyle?: LineHeadStyle; /** * specifies the line head start style of the annotation. */ lineHeadEndStyle?: LineHeadStyle; /** * specifies the border dash array of the annotation. */ borderDashArray?: number; /** * specifies the annotation selector settings of the annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * specifies the minHeight of the annotation. */ minHeight?: number; /** * specifies the minWidth of the annotation. */ minWidth?: number; /** * specifies the minHeight of the annotation. */ maxHeight?: number; /** * specifies the maxWidth of the annotation. */ maxWidth?: number; /** * specifies the locked action of the annotation. */ isLock?: boolean; /** * specifies the custom data of the annotation. */ customData?: object; /** * specifies the leader length of the annotation. */ leaderLength?: number; /** * Defines the cursor type for distance annotation. */ resizeCursorType?: CursorType; /** * Gets or sets the allowed interactions for the locked distance annotations. * IsLock can be configured using distance settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class PerimeterSettings */ export interface PerimeterSettingsModel { /** * Get or set offset of the annotation. */ offset?: IPoint; /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the fill color of the annotation. */ fillColor?: string; /** * specifies the stroke color of the annotation. */ strokeColor?: string; /** * specifies the author of the annotation. */ author?: string; /** * specified the thickness of the annotation. */ thickness?: number; /** * specifies the line head start style of the annotation. */ lineHeadStartStyle?: LineHeadStyle; /** * specifies the line head start style of the annotation. */ lineHeadEndStyle?: LineHeadStyle; /** * specifies the border dash array of the annotation. */ borderDashArray?: number; /** * specifies the minHeight of the annotation. */ minHeight?: number; /** * specifies the minWidth of the annotation. */ minWidth?: number; /** * specifies the minHeight of the annotation. */ maxHeight?: number; /** * specifies the maxWidth of the annotation. */ maxWidth?: number; /** * specifies the locked action of the annotation. */ isLock?: boolean; /** * specifies the annotation selector settings of the annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * Gets or sets the allowed interactions for the locked perimeter annotations. * IsLock can be configured using perimeter settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class AreaSettings */ export interface AreaSettingsModel { /** * Get or set offset of the annotation. */ offset?: IPoint; /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the fill color of the annotation. */ fillColor?: string; /** * specifies the stroke color of the annotation. */ strokeColor?: string; /** * specifies the author of the annotation. */ author?: string; /** * specified the thickness of the annotation. */ thickness?: number; /** * specifies the minHeight of the annotation. */ minHeight?: number; /** * specifies the minWidth of the annotation. */ minWidth?: number; /** * specifies the minHeight of the annotation. */ maxHeight?: number; /** * specifies the maxWidth of the annotation. */ maxWidth?: number; /** * specifies the locked action of the annotation. */ isLock?: boolean; /** * specifies the annotation selector settings of the annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * Gets or sets the allowed interactions for the locked area annotations. * IsLock can be configured using area settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class RadiusSettings */ export interface RadiusSettingsModel { /** * Get or set offset of the annotation. */ offset?: IPoint; /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the width of the annotation. */ width?: number; /** * specifies the height of the annotation. */ height?: number; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the fill color of the annotation. */ fillColor?: string; /** * specifies the stroke color of the annotation. */ strokeColor?: string; /** * specifies the author of the annotation. */ author?: string; /** * specified the thickness of the annotation. */ thickness?: number; /** * specifies the annotation selector settings of the annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * specifies the minHeight of the annotation. */ minHeight?: number; /** * specifies the minWidth of the annotation. */ minWidth?: number; /** * specifies the minHeight of the annotation. */ maxHeight?: number; /** * specifies the maxWidth of the annotation. */ maxWidth?: number; /** * specifies the locked action of the annotation. */ isLock?: boolean; /** * specifies the custom data of the annotation. */ customData?: object; /** * Gets or sets the allowed interactions for the locked radius annotations. * IsLock can be configured using area settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class VolumeSettings */ export interface VolumeSettingsModel { /** * Get or set offset of the annotation. */ offset?: IPoint; /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the fill color of the annotation. */ fillColor?: string; /** * specifies the stroke color of the annotation. */ strokeColor?: string; /** * specifies the author of the annotation. */ author?: string; /** * specified the thickness of the annotation. */ thickness?: number; /** * specifies the minHeight of the annotation. */ minHeight?: number; /** * specifies the minWidth of the annotation. */ minWidth?: number; /** * specifies the minHeight of the annotation. */ maxHeight?: number; /** * specifies the maxWidth of the annotation. */ maxWidth?: number; /** * specifies the locked action of the annotation. */ isLock?: boolean; /** * specifies the annotation selector settings of the annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * Gets or sets the allowed interactions for the locked volume annotations. * IsLock can be configured using volume settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class InkAnnotationSettings */ export interface InkAnnotationSettingsModel { /** * Get or set offset of the annotation. */ offset?: IPoint; /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the width of the annotation. */ width?: number; /** * specifies the height of the annotation. */ height?: number; /** * Gets or sets the path of the ink annotation. */ path?: string; /** * Sets the opacity value for ink annotation.By default value is 1. It range varies from 0 to 1. */ opacity?: number; /** * Sets the stroke color for ink annotation.By default values is #FF0000. */ strokeColor?: string; /** * Sets the thickness for the ink annotation. By default value is 1. It range varies from 1 to 10. */ thickness?: number; /** * Define the default option to customize the selector for ink annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * If it is set as true, can't interact with annotation. Otherwise can interact the annotations. By default it is false. */ isLock?: boolean; /** * specifies the author of the annotation. */ author?: string; /** * Gets or sets the allowed interactions for the locked ink annotations. * IsLock can be configured using ink settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies the custom data of the annotation */ customData?: object; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class StickyNotesSettings */ export interface StickyNotesSettingsModel { /** * Get or set offset of the annotation. */ offset?: IPoint; /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the author of the annotation. */ author?: string; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the annotation selector settings of the annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * specifies the custom data of the annotation. */ customData?: object; /** * specifies the lock action of the annotation. */ isLock?: boolean; /** * Gets or sets the allowed interactions for the locked sticky notes annotations. * IsLock can be configured using sticky notes settings. * * @default ['None'] */ allowedInteractions?: AllowedInteraction[]; /** * specifies whether the individual annotations are included or not in print actions. */ isPrint?: boolean; /** * specifies the subject of the annotation. */ subject?: string; } /** * Interface for a class MeasurementSettings */ export interface MeasurementSettingsModel { /** * specifies the scale ratio of the annotation. */ scaleRatio?: number; /** * specifies the unit of the annotation. */ conversionUnit?: CalibrationUnit; /** * specifies the unit of the annotation. */ displayUnit?: CalibrationUnit; /** * specifies the depth of the volume annotation. */ depth?: number; } /** * Interface for a class FreeTextSettings */ export interface FreeTextSettingsModel { /** * Get or set offset of the annotation. */ offset?: IPoint; /** * Get or set page number of the annotation. */ pageNumber?: number; /** * specifies the opacity of the annotation. */ opacity?: number; /** * specifies the border color of the annotation. */ borderColor?: string; /** * specifies the border with of the annotation. */ borderWidth?: number; /** * specifies the border style of the annotation. */ borderStyle?: string; /** * specifies the author of the annotation. */ author?: string; /** * specifies the background fill color of the annotation. */ fillColor?: string; /** * specifies the text box font size of the annotation. */ fontSize?: number; /** * specifies the width of the annotation. */ width?: number; /** * specifies the height of the annotation. */ height?: number; /** * specifies the text box font color of the annotation. */ fontColor?: string; /** * specifies the text box font family of the annotation. */ fontFamily?: string; /** * setting the default text for annotation. */ defaultText?: string; /** * applying the font styles for the text. */ fontStyle?: FontStyle; /** * Aligning the text in the annotation. */ textAlignment?: TextAlignment; /** * specifies the allow text only action of the free text annotation. */ allowEditTextOnly?: boolean; /** * specifies the annotation selector settings of the annotation. */ annotationSelectorSettings?: AnnotationSelectorSettingsModel; /** * specifies the