| FoxitPDFSDKforWeb v11.0.5 Archives Foxit PDF SDK for Web

Enumerations
constants
PDFViewCtrl

A module includes all PDFViewerCtrl's constants. More...

## Enumerations
enum | ANNOTATION_PERMISSION { fully = 'fully', playable = 'playable', adjustable = 'adjustable', deletable = 'deletable', modifiable = 'modifiable', attachmentDownloadable = 'attachmentDownloadable', replyable = 'replyable', editable = 'editable' }
| An annotation permission enumeration for controlling annotation permissions. This enum is used in `getAnnotPermissions` callback defined in PDFViewer constructor option. Example: More...
enum | DIRECTION { Horizontal = 'horizontal', Vertical = 'vertical', All = 'all' }
| Enum for direction. More...
enum | MouseEventObjectType { annotation ='annotation' }
| Object type of mouse Event. More...
enum | OPEN_FILE_TYPE { FROM_FILE = 'from-file', FROM_URL = 'from-url' }
| Enumerations of ways to open PDF file. More...
enum | PagePointType { viewport = 'viewport', page = 'offset-page' , pdf = 'pdf' }
| Enumerations of page point type. More...
enum | PROGRESS_STATUS { PROGRESSING = 'Progressing', SUCCESS = 'Success', FAIL = 'Fail' }
| Enumeration of task progress status. More...
enum | SNAP_MODE { EndPoint = 'end-point', MidPoint = 'mid-point', IntersectionPoint = 'intersection-point', NearestPoint = 'nearest-point' }
| Enum for snap point flags. More...
enum | STATE_HANDLER_NAMES { STATE_HANDLER_HAND = 'hand' , STATE_HANDLER_CREATE_CARET = 'createCaret', STATE_HANDLER_CREATE_ARROW = 'createArrow', STATE_HANDLER_CREATE_AREA_HIGHLIGHT = 'createAreaHighlight' , STATE_HANDLER_CREATE_CIRCLE = 'createCircle', STATE_HANDLER_CREATE_FILE_ATTACHMENT = 'createFileAttachment', STATE_HANDLER_CREATE_HIGHLIGHT = 'createHighlight', STATE_HANDLER_CREATE_IMAGE = 'createImage', STATE_HANDLER_CREATE_LINK = 'createLink', STATE_HANDLER_CREATE_LINE = 'createLine', STATE_HANDLER_CREATE_DISTANCE ='createDistance', STATE_HANDLER_CREATE_PERIMETER ='createPerimeter', STATE_HANDLER_CREATE_AREA ='createArea', STATE_HANDLER_CREATE_CIRCLE_AREA ='createCircleArea', STATE_HANDLER_CREATE_PENCIL = 'createPencil', STATE_HANDLER_CREATE_POLYGON_CLOUD = 'createPolygonCloud', STATE_HANDLER_CREATE_POLYGON = 'createPolygon', STATE_HANDLER_CREATE_POLYLINE = 'createPolyline', STATE_HANDLER_CREATE_REPLACE = 'createReplace', STATE_HANDLER_CREATE_SQUARE = 'createSquare', STATE_HANDLER_CREATE_SQUIGGLY = 'createSquiggly', STATE_HANDLER_CREATE_STAMP = 'createStamp', STATE_HANDLER_CREATE_STRIKE_OUT = 'createStrikeOut', STATE_HANDLER_CREATE_TEXT = 'createText', STATE_HANDLER_CREATE_UNDERLINE = 'createUnderline', STATE_HANDLER_MARQUEE = 'marquee', STATE_HANDLER_ERASER = 'eraser', STATE_HANDLER_LOUPE = 'loupe', STATE_HANDLER_SELECT_TEXT_ANNOTATION = 'select-text-annotation', STATE_HANDLER_SELECT_TEXT_IMAGE = 'select-text-image', STATE_HANDLER_SELECT_ANNOTATION = 'select-annotation', STATE_HANDLER_CREATE_FREETEXT_BOX = 'createFreeTextBox', STATE_HANDLER_CREATE_FREETEXT_CALLOUT = 'createFreeTextCallout', STATE_HANDLER_CREATE_FREETEXT_TYPEWRITER = 'createFreeTextTypewriter', STATE_HANDLER_CREATE_FIELD_TEXT = 'CreateTextStateHandler', STATE_HANDLER_CREATE_FIELD_SIGNATURE = 'CreateSignStateHandler', STATE_HANDLER_CREATE_FIELD_PUSH_BUTTON = 'CreatePushButtonStateHandler', STATE_HANDLER_CREATE_FIELD_CHECK_BOX = 'CreateCheckBoxStateHandler', STATE_HANDLER_CREATE_RADIO_BUTTON = 'CreateRadioButtonStateHandler', STATE_HANDLER_CREATE_FIELD_COMBO_BOX = 'CreateComboBoxStateHandler', STATE_HANDLER_CREATE_FIELD_LIST_BOX = 'CreateListBoxStateHandler', STATE_HANDLER_CREATE_FIELD_DATE = 'CreateDateStateHandler', STATE_HANDLER_CREATE_FIELD_IMAGE = 'CreateImageStateHandler', STATE_HANDLER_SNAPSHOT_TOOL = 'snapshot-tool' }
| Enumeration of state handler names. When switching the handler state, its better to use these constants exposed from this enum like following example: More...
enum | ViewerEvents { jrLicenseSuccess = 'jr-license-success' , beforeOpenFile = 'before-open-file' , beforeLoadPDFDoc = 'before-load-pdf-document', openFileSuccess = 'open-file-success', openFileFailed = 'open-file-failed', willCloseDocument ='will-close-document' , renderFileSuccess = 'render-file-success', renderFileFailed = 'render-file-error', beforeRenderPage = 'before-render-page', renderPageSuccess = 'render-page-success' , zoomToSuccess = 'zoom-to-success', zoomToFailed = 'zoom-to-failed', startChangeViewMode = 'start-change-view-mode', changeViewModeSuccess = 'change-view-mode-success' , changeViewModeFailed = 'change-view-mode-failed' , pageLayoutRedraw = 'page-layout-redraw' , copyTextSuccess = 'copy-text-success', copyTextFailed = 'copy-text-failed', tapPage = 'tap-page', tapAnnotation = 'tap-annotation', pressPage = 'press-page', pressAnnotation = 'press-annotation' , rightClickPage = 'right-click-page', rightClickAnnotation = 'right-click-annotation', doubleTapPage = 'double-tap-page', doubleTapAnnotation = 'double-tap-annotation', activeAnnotationBefore = 'active-annotation-before', activeAnnotation = 'active-annotation', activeAnnotationAfter = 'active-annotation-after' , activeMultipleAnnotations = 'active-multiple-annotations', unActiveAnnotation = 'unactive-annotation', updateActiveAnnotation = 'update-action-annotation' , removeActiveAnnotationBefore = 'remove-action-annotation-before' , removeActiveAnnotationSuccess = 'remove-action-annotation-success' , removeActiveAnnotationFailed = 'remove-action-annotation-failed' , switchStateHandler = 'switch-state-handler' , pageNumberChange ='page-number-change' , afterDocumentRotation = 'after-document-rotation', snapModeChanged = 'snap-mode-changed' , distanceAnnotCreationStart = 'distance-creation-start' , updateDistanceAnnot = 'update-distance-annot', distanceAnnotCreationEnd = 'distance-creation-end' , selectText ='select-text' , annotationPermissionChanged = 'annotation-premission-changed' , mouseEnter = 'mouse-enter', mouseLeave = 'mouse-leave' , focusOnControl = 'focus-on-control' , eSignCnShowMultiPageStamp = 'eSignCnShowMultiPageStamp' , tapField = 'tap-field', tapGraphicsObject = 'tap-graphics-object' }
| The event type of pdfViewer. Expand the DataEvents. More...

## Detailed Description

A module includes all PDFViewerCtrl's constants.

## Enumeration Type Documentation

## ◆ ANNOTATION_PERMISSION

enum ANNOTATION_PERMISSION

An annotation permission enumeration for controlling annotation permissions. This enum is used in `getAnnotPermissions` callback defined in PDFViewer constructor option. Example:

var ANNOTATION_PERMISSION = PDFViewCtrl.constants.ANNOTATION_PERMISSION;
new PDFViewer({
customs: {
getAnnotPermissions: function(annot) {
var author = annot.getTitle();
switch(author){
case 'admin':
return Promise.resolve([ANNOTATION_PERMISSION.fully]); // The 'admin' has all permissions
case 'manager':
return Promise.resolve([ANNOTATION_PERMISSION.modifiable]); // The 'manager' has modify permissions
case 'normal-user':
return Promise.resolve([]); // means 'normal-user' has no permission
}
return undefined; // Do not control permissions on this annotation.
}
}
})

Enumerator
fully | Indicates that have all permissions;.
playable | Indicates that a media type annotation is playable. This is working for screen annotation only!
adjustable | Indicates that a drawing , text-markup and freetext and any other moveable , rotatable or resizable annotations can be moved, rotated or resized.
deletable | Indicates that an annotation can be deleted.
modifiable | Indicates that the properties and actions of annotations can be modified!
attachmentDownloadable | Indicates that the attachment and multi-media annotation can be downloaded!
replyable | Indicates that an annotation can be replied!
editable | Indicates that a freetext annotation is editable.

## ◆ DIRECTION

enum DIRECTION

Enum for direction.

Since
  11.0.0

Enumerator
Horizontal | The horizontal direction.
Vertical | The vertical direction.
All | The all direction.

## ◆ MouseEventObjectType

enum MouseEventObjectType

Object type of mouse Event.

Enumerator
annotation | Annotation.

## ◆ OPEN_FILE_TYPE

enum OPEN_FILE_TYPE

Enumerations of ways to open PDF file.

Enumerator
FROM_FILE | See also PDFViewer.openPDFByFile
FROM_URL | See also PDFViewer.openPDFByHttpRangeRequest

## ◆ PagePointType

enum PagePointType

Enumerations of page point type.

See also
  PDFPageRender.transformPoint

Since
  8.5.0

Enumerator
viewport | Indicates the coordinate point relative to the upper-left corner of the current viewport， in pixels.
page | Indicates the coordinate point of the upper-left corner of the page relative to the current scaling, in pixels.
pdf | Indicates a point on the standard PDF coordinate system, relative to the lower-left corner of the PDF page, in units of: point(pt).

## ◆ PROGRESS_STATUS

enum PROGRESS_STATUS

Enumeration of task progress status.

Since
  9.1.0

Enumerator
PROGRESSING | Progess state: progress needs to be continued.
SUCCESS | Progress state: progress is finished.
FAIL | Progress state: any error occurs.

## ◆ SNAP_MODE

enum SNAP_MODE

Enum for snap point flags.

Since
  7.6.0

Enumerator
EndPoint | Snap to end points.
MidPoint | Snap to mid points.
IntersectionPoint | Snap to intersections.
NearestPoint | Snap to the nearest point on the path.

## ◆ STATE_HANDLER_NAMES

enum STATE_HANDLER_NAMES

Enumeration of state handler names. When switching the handler state, its better to use these constants exposed from this enum like following example:

function switchStateExample(pdfViewer) {
pdfViewer.getStateHandlerManager()
.switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_HAND);
}

Enumerator
STATE_HANDLER_HAND | The hand state name.
STATE_HANDLER_CREATE_CARET | After switch to this state, users can create 'caret' annotation by mouse on the PDF page.
STATE_HANDLER_CREATE_ARROW | After switch to this state, users can create 'arrow' annotation by mouse on the PDF page.
STATE_HANDLER_CREATE_AREA_HIGHLIGHT | After switch to this state, users can create 'area-highlight' annotation by mouse on the PDF page.
STATE_HANDLER_CREATE_CIRCLE | After switch to this state, users can create 'circle' annotation by mouse on the PDF page.
STATE_HANDLER_CREATE_FILE_ATTACHMENT | This state allows user to create 'file-attachment' annotation by mouse on the PDF page.
STATE_HANDLER_CREATE_HIGHLIGHT | This state allows user to create 'text-highlight' annotation by mouse on the PDF page.
STATE_HANDLER_CREATE_IMAGE | This state allows user to create 'image' annotation by mouse on the PDF page.
STATE_HANDLER_CREATE_LINK | This state allows user to create 'link' annotation on the PDF page.
STATE_HANDLER_CREATE_LINE | This state allows user to create 'line' annotation on the PDF page.
STATE_HANDLER_CREATE_DISTANCE | Tihs state allows user to measure distance on the PDF page.
STATE_HANDLER_CREATE_PERIMETER | Tihs state allows user to measure perimeter of a polygon on the PDF page.
STATE_HANDLER_CREATE_AREA | Tihs state allows user to measure the area of a polygon on the PDF page.
STATE_HANDLER_CREATE_CIRCLE_AREA | Tihs state allows user to measure the area of a circle on the PDF page.
STATE_HANDLER_CREATE_PENCIL | This state allows user to create 'pencil' annotation on the PDF page.
STATE_HANDLER_CREATE_POLYGON_CLOUD | This state allows user to create 'polygon-cloud' annotation on the PDF page.
STATE_HANDLER_CREATE_POLYGON | This state allows user to create 'polygon' annotation on the PDF page.
STATE_HANDLER_CREATE_POLYLINE | This state allows user to create 'polyline' annotation on the PDF page.
STATE_HANDLER_CREATE_REPLACE | This state allows user to create 'replace' annotation on the PDF page.
STATE_HANDLER_CREATE_SQUARE | This state allows user to create 'square' annotation on the PDF page.
STATE_HANDLER_CREATE_SQUIGGLY | This state allows user to create 'squiggly' annotation on the PDF page.
STATE_HANDLER_CREATE_STAMP | This state allows user to create 'stamp' on the PDF page. Note Data format for second parameters of StateHandlerManager.switchTo, Refer to StampStateHandlerParams: For built-in stamps or or recorded custom stamps, The parameter should like this: { category: string, // required. The category of stamp! name:string,// required. The name of stamp. required! } // List of categories and corresponding names: // 'Dynamic': 'Approved', 'Revised', 'Reviewed', 'Received', 'Confidential' // 'SignHere': 'Accepted', 'Witness', 'SignHere', 'Rejected', 'Initial' // 'Static': 'Approved', 'Void', 'Verified', 'Revised', 'Reviewed', 'Received', 'Final', 'Expired', 'Emergency', 'Draft', 'Confidential', 'Completed' For temporary stamps, The parameters should be like this: { category:string,// required. The category of stamp! name:string,// required. The name of stamp. required! fileType: string, // required. 'png', 'pdf' ... url: string, // required. 'http://xxx/xx.png' or 'blob:http://xxxxx' showUrl: string,// required. 'http://xxx/xx.png' or 'blob:http://xxxxx' width: number, // optional. 80 height: number // optional. 30 }
STATE_HANDLER_CREATE_STRIKE_OUT | This state allows user to create 'strike-out' annotation on the PDF page.
STATE_HANDLER_CREATE_TEXT | This state allows user to create 'note' annotation on the PDF page.
STATE_HANDLER_CREATE_UNDERLINE | This state allows user to create 'underline' annotation on the PDF page.
STATE_HANDLER_MARQUEE | Switch to this state to enable marquee magnifier tool.
STATE_HANDLER_ERASER | This state allows user to erase pencil annotations.
STATE_HANDLER_LOUPE | Switch to this state to enable loupe tool.
STATE_HANDLER_SELECT_TEXT_ANNOTATION | Switch to this to enable selection tool. Note This state handler has been deprecated since version 7.6, and replaced by two new handlers STATE_HANDLER_SELECT_TEXT_IMAGE and STATE_HANDLER_SELECT_ANNOTATION.
STATE_HANDLER_SELECT_TEXT_IMAGE | Switch to this to enable selection text or image tool.
STATE_HANDLER_SELECT_ANNOTATION | Switch to this to enable selection annotation tool.
STATE_HANDLER_CREATE_FREETEXT_BOX | Switch to this state to enable freetext box creation tool.
STATE_HANDLER_CREATE_FREETEXT_CALLOUT | Switch to this state to enable freetext callout creation tool.
STATE_HANDLER_CREATE_FREETEXT_TYPEWRITER | Switch to this state to enable freetext typewriter creation tool.
STATE_HANDLER_CREATE_FIELD_TEXT | This state allows user to create 'text-field' on the PDF page.
STATE_HANDLER_CREATE_FIELD_SIGNATURE | This state allows user to create 'signature-field' on the PDF page.
STATE_HANDLER_CREATE_FIELD_PUSH_BUTTON | This state allows user to create 'push-button-field' on the PDF page.
STATE_HANDLER_CREATE_FIELD_CHECK_BOX | This state allows user to create 'check-box-field' on the PDF page.
STATE_HANDLER_CREATE_RADIO_BUTTON | This state allows user to create 'radio-button-field' on the PDF page.
STATE_HANDLER_CREATE_FIELD_COMBO_BOX | This state allows user to create 'combo-box-field' on the PDF page.
STATE_HANDLER_CREATE_FIELD_LIST_BOX | This state allows user to create 'list-box-field' on the PDF page.
STATE_HANDLER_CREATE_FIELD_DATE | This state allows user to create 'date-field' on the PDF page.
STATE_HANDLER_CREATE_FIELD_IMAGE | This state allows user to create 'image-field' on the PDF page.
STATE_HANDLER_SNAPSHOT_TOOL | Switch to this state to enable snapshot tool.

## ◆ ViewerEvents

enum ViewerEvents

The event type of pdfViewer. Expand the DataEvents.

See also
  DataEvents

Enumerator
jrLicenseSuccess | Jr engine certification successful. //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.jrLicenseSuccess, () => { //do something })
beforeOpenFile | The event that fires before the document begins to open. //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.beforeOpenFile, () => { //do something }) Since 8.4.0
  beforeLoadPDFDoc | The event that fires before the document begins to load. Parameters
  type | - How the document is loaded 'http' : PDFViewer.openPDFByHttpRangeRequest 'memory' : PDFViewer.openPDFByFile
  args | The argument list used to open the PDF document. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.beforeLoadPDFDoc, (type,...args) => { })
See also PDFViewer.openPDFByHttpRangeRequest PDFViewer.openPDFByFile Since 8.0.0
  openFileSuccess | The document opens successfully, but the rendering is not necessarily complete. Parameters
  pdfDoc | {PDFDoc} //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.openFileSuccess, (pdfDoc) => { //do something })
openFileFailed | Failed to open document. //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.openFileFailed, () => { //do something })
willCloseDocument | The document will be closed. //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.willCloseDocument, () => { //do something })
  renderFileSuccess | The document was successfully rendered. Parameters
  pdfDoc | {PDFDoc} //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.renderFileSuccess, (pdfDoc) => { //do something })
renderFileFailed | Failed to render document. //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.renderFileFailed, () => { //do something })
  beforeRenderPage | The event that fires before the page starts to render. Parameters
  pageRender | PDFPageRender The rendered page-render object.
  isFirstTime | boolean Whether the page is rendered for the first time.. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.beforeRenderPage, (pageRender, isFirstTime) => { //do something })
See also PDFViewCtrl.constants.ViewerEvents.renderPageSuccess PDFPageRendering.rendering Since 8.0.0
  renderPageSuccess | Page rendered successfully. Parameters
  pageRender | {PageRender}
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.renderPageSuccess, (pageRender) => { //do something })
zoomToSuccess | Scaling succeeded. //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.zoomToSuccess, (newScale, oldScale) => { //do something })
zoomToFailed | Scaling failure. //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.zoomToFailed, (newScale, oldScale) => { //do something })
  startChangeViewMode | Start toggling view mode. Parameters
  NewViewModeClass | {function(new:IViewMode)}
  OldViewModeClass | {function(new:IViewMode)}
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.startChangeViewMode, (NewViewModeClass, OldViewModeClass) => { //do something })
  changeViewModeSuccess | Successfully switch view mode. Parameters
  NewViewModeClass | {function(new:IViewMode)}
  OldViewModeClass | {function(new:IViewMode)}
  newViewModeInstance | {IViewMode}
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.changeViewModeSuccess, (NewViewModeClass, OldViewModeClass, newViewModeInstance) => { //do something })
  changeViewModeFailed | Failed to switch view mode. Parameters
  NewViewModeClass | {function(new:IViewMode)}
  OldViewModeClass | {function(new:IViewMode)}
  currentViewModeInstance | {IViewMode} //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.changeViewModeFailed, (NewViewModeClass, OldViewModeClass, currentViewModeInstance) => { //do something })
  pageLayoutRedraw | Redraw the page layout. Parameters
  pageRender | {PageRender}
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.pageLayoutRedraw, (pageRender) => { //do something })
copyTextSuccess | Copy text successful. //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.copyTextSuccess, (text) => { //do something })
copyTextFailed | Failed to copy text. //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.copyTextFailed, (text) => { //do something })
  tapPage | Click on the page. Parameters
  e | event object of hammer.js //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.tapPage, (e) => { //do something })
  tapAnnotation | Click the notation. Parameters
  annotRender | {AnnotRender}
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.tapAnnotation, (annotRender) => { //do something })
  pressPage | Triggered when the pointer presses 251ms on the PDF page without any movement. This event is only available if the state is "hand". Parameters
  e | event object of hammer.js //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.pressPage, (e) => { //do something })
  pressAnnotation | Long press the notation. Parameters
  annotRender | {AnnotRender}
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.pressAnnotation, (annotRender) => { //do something })
rightClickPage | Right-click the page. //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.rightClickPage, () => { //do something })
  rightClickAnnotation | Right-click annotation. Parameters
  annotRender | {AnnotRender}
  e | MouseEvent //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.rightClickAnnotation, (annotRender,e) => { //do something })
  doubleTapPage | Double-click on the page. Parameters
  e | event object of hammer.js //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.doubleTapPage, (e) => { //do something })
  doubleTapAnnotation | Double-click the annotation. Parameters
  annotRender | {AnnotRender}
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.doubleTapAnnotation, (annotRender) => { //do something })
  activeAnnotationBefore | Prepare to activate the annotation. Parameters
  annotRender | {AnnotRender}
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.activeAnnotationBefore, (annotRender) => { //do something })
  activeAnnotation | Activate the annotation. Parameters
  annotRender | {AnnotRender}
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.activeAnnotation, (annotRender) => { //do something })
  activeAnnotationAfter | Activate the annotation. Parameters
  annotRender | {AnnotRender} //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.activeAnnotationAfter, (annotRender) => { //do something })
  activeMultipleAnnotations | Activate multiple annotations at once. Parameters
  annotRender | {AnnotRender}
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.activeMultipleAnnotations, (annotRenders: Array<annotRender>) => { //do something })
  unActiveAnnotation | Parameters
  annotRender | {AnnotRender} //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.unActiveAnnotation, (annotRender) => { //do something });
  updateActiveAnnotation | Update the active annotations. Parameters
  annotComponent | {AnnotComponent}
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.updateActiveAnnotation, (annotComponent) => { //do something })
  removeActiveAnnotationBefore | Delete the active annotation before. Parameters
  annotComponent | {AnnotComponent}
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.removeActiveAnnotationBefore, (annotComponent) => { //do something })
  removeActiveAnnotationSuccess | The active annotation was deleted successfully. Parameters
  annotComponent | {AnnotComponent}
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.removeActiveAnnotationSuccess, (annotComponent) => { //do something })
  removeActiveAnnotationFailed | Failed to delete active annotation. Parameters
  annotComponent | {AnnotComponent}
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.removeActiveAnnotationFailed, (annotComponent) => { //do something })
  switchStateHandler | Switch stateHandler. Parameters
  NewStateHandlerClass | {function(new:IStateHandler)}
  OldStateHandlerClass | {function(new:IStateHandler)}
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.switchStateHandler, (NewStateHandlerClass, OldStateHandlerClass) => { //do something }
pageNumberChange | The page number displayed has changed. //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.pageNumberChange, (newPageNumber) => { // newPageNumber = pageIndex + 1 })
afterDocumentRotation | Triggered after document rotatted success. Since 7.4.0 pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.afterDocumentRotation, (newRotationDegree,originRotationDegree) => { }) See also PDFViewer::rotateTo
snapModeChanged | Triggered after snap mode changed. Since 7.6.0 pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.snapModeChanged, (stateHandlerName:PDFViewCtrl.constants.STATE_HANDLER_NAMES,newSnapMode:SNAP_MODE[],lastSnapMode:SNAP_MODE[]|undefined) => { }) See also PDFViewer::setSnapMode
  distanceAnnotCreationStart | Triggered when the mouse drag starts in the process of creating a measurement. Parameters
  annot | Annot
Since 8.0.0 pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.distanceAnnotCreationStart, (annot) => { // do something })
  updateDistanceAnnot | Triggered when the mouse drag starts in the process of changing a measurement. Parameters
  annot | Annot
Since 8.0.0 pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.updateDistanceAnnot , (annot) => { })
  distanceAnnotCreationEnd | Triggered when the measuring is complete and mouse is released. Parameters
  annot | Annot
Since 8.0.0 //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.distanceAnnotCreationEnd, (annot) => { //do something })
  selectText | Information about the selected text. Parameters
  selectedTextSummary | object
  selectedTextSummary.page | {PDFPage}
  selectedTextSummary.text | {String}
  selectedTextSummary.rectArray | {Array}
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.selectText, (selectedTextSummary) => { //do something })
  annotationPermissionChanged | Triggered on an annotation permission changed. Parameters
  annot | Annot
  newPermission | AnnotationPermission pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.annotationPermissionChanged, (annot, newPermission) => { // do something })
See also AnnotationAuthorityManager.subscribe
  mouseEnter | Mouse-enter Event. Parameters
  type | {string} Object type of mouse Event. MouseEventObjectType
  options | {object} The parameter object of the event
  options.annots | {object} The annotations if the type is annotation，otherwise undefined
  options.e | MouseEvent //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.mouseEnter, (type, options) => { // do something })
  mouseLeave | Mouse-leave Event. Parameters
  type | {string} Object type of mouse Event. MouseEventObjectType
  options | {object} The parameter object of the event
  options.annots | {object} The annotations if the type is annotation，otherwise undefined
  options.e | MouseEvent //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.mouseLeave, (type, options) => { //do something })
  focusOnControl | Triggered when the field is focused. Parameters
  widget | Widget pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.focusOnControl, widget => { // do something })
eSignCnShowMultiPageStamp | eSignCN event group
  tapField | Triggered when the field is clicked. eSignCN event group end Parameters
  widget | {Widget} pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.tapField, (widget) => { // do something })
Since 8.5.2
  tapGraphicsObject | Triggered when the graphics object is clicked. Parameters
  graphicsObject | GraphicsObject Page graphics object. //GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.tapGraphicsObject, (graphicsObject) => { //do something })
Since 9.0.0

@2025 Foxit Software Incorporated. All rights reserved.