UNPKG

@syncfusion/ej2-pdfviewer

Version:
1,642 lines 232 kB
import { Component, INotifyPropertyChanged, ChildProperty, L10n } from '@syncfusion/ej2-base'; import { ModuleDeclaration, EmitType } from '@syncfusion/ej2-base'; import { PdfViewerModel, HighlightSettingsModel, UnderlineSettingsModel, StrikethroughSettingsModel, LineSettingsModel, ArrowSettingsModel, RectangleSettingsModel, CircleSettingsModel, PolygonSettingsModel, StampSettingsModel, StickyNotesSettingsModel, CustomStampSettingsModel, VolumeSettingsModel, RadiusSettingsModel, AreaSettingsModel, PerimeterSettingsModel, DistanceSettingsModel, MeasurementSettingsModel, FreeTextSettingsModel, AnnotationSelectorSettingsModel, TextSearchColorSettingsModel, PageInfoModel, DocumentTextCollectionSettingsModel, TextDataSettingsModel, RectangleBoundsModel, SignatureFieldSettingsModel, InitialFieldSettingsModel, SignatureIndicatorSettingsModel, TextFieldSettingsModel, PasswordFieldSettingsModel, CheckBoxFieldSettingsModel, RadioButtonFieldSettingsModel, DropdownFieldSettingsModel, ListBoxFieldSettingsModel, ItemModel, SignatureDialogSettingsModel, PageOrganizerSettingsModel } from './pdfviewer-model'; import { ToolbarSettingsModel, ShapeLabelSettingsModel, KeyGestureModel, KeyboardCommandModel, CommandManagerModel } from './pdfviewer-model'; import { ServerActionSettingsModel, AjaxRequestSettingsModel, CustomStampModel, CustomToolbarItemModel, HandWrittenSignatureSettingsModel, AnnotationSettingsModel, TileRenderingSettingsModel, ScrollSettingsModel, FormFieldModel, InkAnnotationSettingsModel } from './pdfviewer-model'; import { IAnnotationPoint, IPoint, PdfViewerBase } 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, ZOrderPageTable } from './drawing/pdf-annotation'; import { PdfAnnotationBaseModel, PdfFormFieldBaseModel } from './drawing/pdf-annotation-model'; import { Drawing, ClipBoardObject } from './drawing/drawing'; import { SelectorModel } from './drawing/selector-model'; import { PointModel, IElement, Rect, Point, Size } from '@syncfusion/ej2-drawings'; import { ThumbnailClickEventArgs } from './index'; import { ValidateFormFieldsArgs, BookmarkClickEventArgs, AnnotationUnSelectEventArgs, BeforeAddFreeTextEventArgs, FormFieldFocusOutEventArgs, CommentEventArgs, FormFieldClickArgs, FormFieldAddArgs, FormFieldRemoveArgs, FormFieldPropertiesChangeArgs, FormFieldMouseLeaveArgs, FormFieldMouseoverArgs, FormFieldMoveArgs, FormFieldResizeArgs, FormFieldSelectArgs, FormFieldUnselectArgs, FormFieldDoubleClickArgs, AnnotationMovingEventArgs, KeyboardCustomCommandsEventArgs } from './base'; import { AddSignatureEventArgs, RemoveSignatureEventArgs, MoveSignatureEventArgs, SignaturePropertiesChangeEventArgs, ResizeSignatureEventArgs, SignatureSelectEventArgs, SignatureUnselectEventArgs } from './base'; import { ContextMenuSettingsModel } from './pdfviewer-model'; import { IFormField, IFormFieldBound } from './form-designer/form-designer'; import { ClickEventArgs, MenuItemModel } from '@syncfusion/ej2-navigations'; /** * The `ToolbarSettings` module is used to provide the toolbar settings of PDF viewer. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the tool bar settings. * viewer.toolbarSettings = { * showTooltip: false, * toolbarItems: [ * "OpenOption", * "UndoRedoTool", * "PageNavigationTool", * "MagnificationTool", * "PanTool", * "SelectionTool", * "CommentTool", * "SubmitForm", * "AnnotationEditTool", * "FormDesignerEditTool", * "FreeTextAnnotationOption", * "InkAnnotationOption", * "ShapeAnnotationOption", * "StampAnnotation", * "SignatureOption", * "SearchOption", * "PrintOption", * "DownloadOption" * ], * annotationToolbarItems: [ * "HighlightTool", * "UnderlineTool", * "StrikethroughTool", * "ColorEditTool", * "OpacityEditTool", * "AnnotationDeleteTool", * "StampAnnotationTool", * "HandWrittenSignatureTool", * "InkAnnotationTool", * "ShapeTool", * "CalibrateTool", * "StrokeColorEditTool", * "ThicknessEditTool", * "FreeTextAnnotationTool", * "FontFamilyAnnotationTool", * "FontSizeAnnotationTool", * "FontStylesAnnotationTool", * "FontAlignAnnotationTool", * "FontColorAnnotationTool", * "CommentPanelTool" * ], * formDesignerToolbarItems: [ * "TextboxTool", * "PasswordTool", * "CheckBoxTool", * "RadioButtonTool", * "DropdownTool", * "ListboxTool", * "DrawSignatureTool", * "DeleteTool" * ] * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class ToolbarSettings extends ChildProperty<ToolbarSettings> { /** * 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[]; } /** * Defines customized toolbar items. */ export declare class CustomToolbarItem extends ChildProperty<CustomToolbarItem> { /** * 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; } /** * The `AjaxRequestSettings` module is used to set the ajax Request Headers of PDF viewer. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // HTTP header "X-Custom-Header": "Custom header value" // Custom HTTP header * viewer.ajaxRequestSettings = { * ajaxHeaders: [ * { * headerName : "Authorization", * headerValue : "Bearer" * } * ], * withCredentials: false * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class AjaxRequestSettings extends ChildProperty<AjaxRequestSettings> { /** * set the ajax Header values in the PdfViewer. */ ajaxHeaders: IAjaxHeaders[]; /** * set the ajax credentials for the pdfviewer. */ withCredentials: boolean; } export interface IAjaxHeaders { /** * specifies the ajax Header Name of the PdfViewer. */ headerName: string; /** * specifies the ajax Header Value of the PdfViewer. */ headerValue: string; } /** * The `CustomStamp` module is used to provide the custom stamp added in stamp menu of the PDF Viewer toolbar. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Add your custom stamp image source as base64 image. * viewer.customStamp = [ * { * customStampName: 'Sample', * customStampImageSource: "data:image/png;base64, Syncfusion pdf viewer" * } * ]; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class CustomStamp extends ChildProperty<CustomStamp> { /** * 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; } /** * The `AnnotationToolbarSettings` module is used to provide the annotation toolbar settings of the PDF viewer. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the annotation tool bar settings. * viewer.toolbarSettings = { * showTooltip: false, * annotationToolbarItems: [ * "HighlightTool", * "UnderlineTool", * "StrikethroughTool", * "ColorEditTool", * "OpacityEditTool", * "AnnotationDeleteTool", * "StampAnnotationTool", * "HandWrittenSignatureTool", * "InkAnnotationTool", * "ShapeTool", * "CalibrateTool", * "StrokeColorEditTool", * "ThicknessEditTool", * "FreeTextAnnotationTool", * "FontFamilyAnnotationTool", * "FontSizeAnnotationTool", * "FontStylesAnnotationTool", * "FontAlignAnnotationTool", * "FontColorAnnotationTool", * "CommentPanelTool" * ], * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class AnnotationToolbarSettings extends ChildProperty<AnnotationToolbarSettings> { /** * Enable or disables the tooltip of the toolbar. */ showTooltip: boolean; /** * shows only the defined options in the PdfViewer. */ annotationToolbarItem: AnnotationToolbarItem[]; } /** * The `FormDesignerToolbarSettings` module is used to provide the Form designer toolbar settings of the PDF viewer. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the form field tool bar settings. * viewer.toolbarSettings = { * showTooltip: false, * formDesignerToolbarItems: [ * "TextboxTool", * "PasswordTool", * "CheckBoxTool", * "RadioButtonTool", * "DropdownTool", * "ListboxTool", * "DrawSignatureTool", * "DeleteTool" * ] * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class FormDesignerToolbarSettings extends ChildProperty<FormDesignerToolbarSettings> { /** * Enable or disables the tooltip of the toolbar. */ showTooltip: boolean; /** * shows only the defined options in the PdfViewer. */ formDesignerToolbarItem: FormDesignerToolbarItem[]; } /** * The `SignatureFieldSettings` module is used to set the properties of signature field in PDF Viewer * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the signature field settings. * viewer.signatureFieldSettings = { * name: "", * isReadOnly: true, * visibility: "visible", * isRequired: true, * isPrint: false, * tooltip: "", * thickness: 1, * 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 * } * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class SignatureFieldSettings extends ChildProperty<SignatureFieldSettings> { /** * 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; }; } /** * The `InitialFieldSettings` module is used to set the properties of initial field in PDF Viewer * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Changes the initial field settings. * viewer.initialFieldSettings = { * name: "", * isReadOnly: true, * visibility: "visible", * isRequired: true, * isPrint: true, * tooltip: "", * thickness: 1, * initialIndicatorSettings: { * opacity: 1, * backgroundColor: "orange", * width: 19, * height: 10, * fontSize: 10, * text: null, * color: "black" * }, * initialDialogSettings: { * displayMode: DisplayMode.Draw | DisplayMode.Text | DisplayMode.Upload, * hideSaveSignature: false * } * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class InitialFieldSettings extends ChildProperty<InitialFieldSettings> { /** * 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; }; } /** * The `SignatureIndicatorSettings` module is used to provide the properties of signature Indicator in the signature field. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the signature indicator settings. * viewer.signatureFieldSettings = { * signatureIndicatorSettings: { * opacity: 1, * backgroundColor: 'orange', * width: 19, * height: 10, * fontSize: 10, * text: null, * color: 'black' * } * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class SignatureIndicatorSettings extends ChildProperty<SignatureIndicatorSettings> { /** * 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; } /** * The `SignatureDialogSettings` module is used to customize the signature dialog box. * * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the signature dialog settings. * viewer.signatureDialogSettings = { * displayMode: DisplayMode.Draw | DisplayMode.Text | DisplayMode.Upload, * hideSaveSignature: true * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class SignatureDialogSettings extends ChildProperty<SignatureDialogSettings> { /** * 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; } /** * The `ServerActionSettings` module is used to provide the server action methods of PDF viewer. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the server action settings. * viewer.serverActionSettings = { * load: "Load", * renderPages: "RenderPdfPages", * unload: "Unload", * download: "Download", * renderThumbnail: "RenderThumbnailImages", * print: "PrintImages", * renderComments: "RenderAnnotationComments", * importAnnotations: "ImportAnnotations", * exportAnnotations: "ExportAnnotations", * importFormFields: "ImportFormFields", * exportFormFields: "ExportFormFields", * renderTexts: "RenderPdfTexts", * validatePassword: "ValidatePassword" * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class ServerActionSettings extends ChildProperty<ServerActionSettings> { /** * 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; } /** * The `StrikethroughSettings` module is used to provide the properties to Strikethrough annotation. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the strike through annotation settings. * viewer.strikethroughSettings = { * opacity: 1, * color: '#ff0000', * author: 'Guest', * annotationSelectorSettings: { * selectionBorderColor: '', * resizerBorderColor: 'black', * resizerFillColor: '#FF4081', * resizerSize: 8, * selectionBorderThickness: 1, * resizerShape: 'Square', * selectorLineDashArray: [], * resizerLocation: AnnotationResizerLocation.Corners | AnnotationResizerLocation.Edges * }, * isLock: false, * enableMultiPageAnnotation: false, * enableTextMarkupResizer: false, * allowedInteractions: ['None'], * isPrint: true * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class StrikethroughSettings extends ChildProperty<StrikethroughSettings> { /** * Get or set page number of the annotation. */ pageNumber: number; /** * Get or set bounds of the annotation. * * @default [] */ bounds: IAnnotationPoint[]; /** * 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; } /** * The `UnderlineSettings` module is used to provide the properties to Underline annotation. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the underline annotation settings. * viewer.underlineSettings = { * opacity: 1, * color: '#9c2592', * author: 'Guest', * annotationSelectorSettings: { * selectionBorderColor: '', * resizerBorderColor: 'black', * resizerFillColor: '#FF4081', * resizerSize: 8, * selectionBorderThickness: 1, * resizerShape: 'Square', * selectorLineDashArray: [], * resizerLocation: AnnotationResizerLocation.Corners | AnnotationResizerLocation.Edges * }, * isLock: false, * enableMultiPageAnnotation: false, * enableTextMarkupResizer: false, * allowedInteractions: ['None'], * isPrint: true * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class UnderlineSettings extends ChildProperty<UnderlineSettings> { /** * Get or set page number of the annotation. */ pageNumber: number; /** * Get or set bounds of the annotation. * * @default [] */ bounds: IAnnotationPoint[]; /** * 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; } /** * The `HighlightSettings` module is used to provide the properties to Highlight annotation. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the highlight annotation settings. * viewer.highlightSettings = { * opacity: 1, * color: '#ff0000', * author: 'Guest', * annotationSelectorSettings: { * selectionBorderColor: '', * resizerBorderColor: 'black', * resizerFillColor: '#FF4081', * resizerSize: 8, * selectionBorderThickness: 1, * resizerShape: 'Square', * selectorLineDashArray: [], * resizerLocation: AnnotationResizerLocation.Corners | AnnotationResizerLocation.Edges * }, * isLock: false, * enableMultiPageAnnotation: false, * enableTextMarkupResizer: false, * allowedInteractions: ['None'], * isPrint: true * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class HighlightSettings extends ChildProperty<HighlightSettings> { /** * Get or set page number of the annotation. */ pageNumber: number; /** * Get or set bounds of the annotation. * * @default [] */ bounds: IAnnotationPoint[]; /** * 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; } /** * The `LineSettings` module is used to provide the properties to line annotation. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the line annotation settings. * viewer.lineSettings = { * opacity: 1, * color: '#9c2592', * author: 'Guest', * annotationSelectorSettings: { * selectionBorderColor: '', * resizerBorderColor: 'black', * resizerFillColor: '#FF4081', * resizerSize: 8, * selectionBorderThickness: 1, * resizerShape: 'Square', * selectorLineDashArray: [], * resizerLocation: AnnotationResizerLocation.Corners | AnnotationResizerLocation.Edges * }, * isLock: false, * enableMultiPageAnnotation: false, * enableTextMarkupResizer: false, * allowedInteractions: ['None'], * isPrint: true * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class LineSettings extends ChildProperty<LineSettings> { /** * Get or set offset of the annotation. */ offset: IPoint; /** * Get or set page number of the annotation. */ pageNumber: number; /** * Get or set vertex points of the annotation. * * @default [] */ vertexPoints?: PointModel[]; /** * 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; } /** * The `ArrowSettings` module is used to provide the properties to arrow annotation. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the arrow annotation settings. * viewer.arrowSettings = { * opacity: 1, * fillColor: '#9c2592', * strokeColor: '#ff0000', * author: 'Guest', * thickness: 1, * borderDashArray: 0, * lineHeadStartStyle: 'Closed', * lineHeadEndStyle: 'Closed', * annotationSelectorSettings: { * selectionBorderColor: '', * resizerBorderColor: 'black', * resizerFillColor: '#FF4081', * resizerSize: 8, * selectionBorderThickness: 1, * resizerShape: 'Square', * selectorLineDashArray: [], * resizerLocation: AnnotationResizerLocation.Corners | AnnotationResizerLocation.Edges, * resizerCursorType: null * }, * minHeight: 0, * minWidth: 0, * maxWidth: 0, * maxHeight: 0, * isLock: false, * allowedInteractions: ['None'], * isPrint: true * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class ArrowSettings extends ChildProperty<ArrowSettings> { /** * Get or set offset of the annotation. */ offset: IPoint; /** * Get or set page number of the annotation. */ pageNumber: number; /** * Get or set vertex points of the annotation. * * @default [] */ vertexPoints?: PointModel[]; /** * 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; } /** * The `RectangleSettings` module is used to provide the properties to rectangle annotation. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the rectangle annotation settings. * viewer.rectangleSettings = { * opacity: 1, * fillColor: '#9c2592', * strokeColor: '#ff0000', * author: 'Guest', * thickness: 1, * annotationSelectorSettings: { * selectionBorderColor: '', * resizerBorderColor: 'black', * resizerFillColor: '#FF4081', * resizerSize: 8, * selectionBorderThickness: 1, * resizerShape: 'Square', * selectorLineDashArray: [], * resizerLocation: AnnotationResizerLocation.Corners | AnnotationResizerLocation.Edges, * resizerCursorType: null * }, * minHeight: 0, * minWidth: 0, * maxWidth: 0, * maxHeight: 0, * isLock: false, * allowedInteractions: ['None'], * isPrint: true * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class RectangleSettings extends ChildProperty<RectangleSettings> { /** * 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; } /** * The `CircleSettings` module is used to provide the properties to circle annotation. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the circle annotation settings. * viewer.circleSettings = { * opacity: 1, * fillColor: '#9c2592', * strokeColor: '#ff0000', * author: 'Guest', * thickness: 1, * annotationSelectorSettings: { * selectionBorderColor: '', * resizerBorderColor: 'black', * resizerFillColor: '#FF4081', * resizerSize: 8, * selectionBorderThickness: 1, * resizerShape: 'Square', * selectorLineDashArray: [], * resizerLocation: AnnotationResizerLocation.Corners | AnnotationResizerLocation.Edges, * resizerCursorType: null * }, * minHeight: 0, * minWidth: 0, * maxWidth: 0, * maxHeight: 0, * isLock: false, * allowedInteractions: ['None'], * isPrint: true * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class CircleSettings extends ChildProperty<CircleSettings> { /** * 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; } /** * The `ShapeLabelSettings` module is used to provide the properties to rectangle annotation. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the shape label settings. * viewer.shapeLabelSettings = { * opacity: 1, * fillColor: '#9c2592', * borderColor: '#ff0000', * fontColor: '#000', * fontSize: 16, * labelHeight: 24.6, * labelMaxWidth: 151, * labelContent: 'Label' * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class ShapeLabelSettings extends ChildProperty<ShapeLabelSettings> { /** * 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; } /** * The `PolygonSettings` module is used to provide the properties to polygon annotation. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the polygon annotation settings. * viewer.polygonSettings = { * opacity: 1, * fillColor: '#4070FF', * strokeColor: '#ff0000', * author: 'Guest', * thickness: 1, * annotationSelectorSettings: { * selectionBorderColor: '', * resizerBorderColor: 'black', * resizerFillColor: '#FF4081', * resizerSize: 8, * selectionBorderThickness: 1, * resizerShape: 'Square', * selectorLineDashArray: [], * resizerLocation: AnnotationResizerLocation.Corners | AnnotationResizerLocation.Edges, * resizerCursorType: null * }, * minHeight: 0, * minWidth: 0, * maxWidth: 0, * maxHeight: 0, * isLock: false, * allowedInteractions: ['None'], * isPrint: true * }; * viewer.appendTo("#pdfViewer"); * ``` * */ export declare class PolygonSettings extends ChildProperty<PolygonSettings> { /** * Get or set offset of the annotation. */ offset: IPoint; /** * Get or set page number of the annotation. */ pageNumber: number; /** * Get or set vertex points of the annotation. * * @default [] */ vertexPoints?: PointModel[]; /** * 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; } /** * The `stampSettings` module is used to provide the properties to stamp annotation. * * ```html * <div id="pdfViewer" style="height: 100%;width: 100%;"></div> * ``` * ```ts * let viewer: PdfViewer = new PdfViewer(); * // Change the stamp annotation settings. * viewer.stampSettings = { * opacity: 1, * author: 'Guest', * annotationSelectorSettings: { * selectionBorderColor: '', * resizerBorderColor: 'red', * resizerFillColor: '#FF4081', * resizerSize: 8, * selectionBorderThickness: 5, * resizerShape: 'Circle', * selectorLineDashArray: []