FoxitPDFSDKforWeb
v10.0.0
Foxit PDF SDK for Web
|
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 | 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' , eSignCnShowAuthPromote = 'eSignCnShowAuthPromote' , tapField = 'tap-field', tapGraphicsObject = 'tap-graphics-object' } |
The event type of pdfViewer. Expand the DataEvents. More... | |
A module includes all PDFViewerCtrl's constants.
An annotation permission enumeration for controlling annotation permissions. This enum is used in getAnnotPermissions
callback defined in PDFViewer constructor option. Example:
enum MouseEventObjectType |
enum OPEN_FILE_TYPE |
Enumerations of ways to open PDF file.
Enumerator | |
---|---|
FROM_FILE |
|
FROM_URL |
enum PagePointType |
Enumerations of page point type.
enum PROGRESS_STATUS |
enum SNAP_MODE |
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:
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.
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.
|
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. |
enum ViewerEvents |
The event type of pdfViewer. Expand the 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 })
| ||||||||
beforeLoadPDFDoc | The event that fires before the document begins to load.
| ||||||||
openFileSuccess | The document opens successfully, but the rendering is not necessarily complete.
| ||||||||
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.
| ||||||||
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.
| ||||||||
renderPageSuccess | Page rendered successfully.
//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.
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.startChangeViewMode, (NewViewModeClass, OldViewModeClass) => { //do something }) | ||||||||
changeViewModeSuccess | Successfully switch view mode.
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.changeViewModeSuccess, (NewViewModeClass, OldViewModeClass, newViewModeInstance) => { //do something }) | ||||||||
changeViewModeFailed | Failed to switch view mode.
| ||||||||
pageLayoutRedraw | Redraw the page layout.
//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.
| ||||||||
tapAnnotation | Click the notation.
//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".
| ||||||||
pressAnnotation | Long press the notation.
//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.
| ||||||||
doubleTapPage | Double-click on the page.
| ||||||||
doubleTapAnnotation | Double-click the annotation.
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.doubleTapAnnotation, (annotRender) => { //do something }) | ||||||||
activeAnnotationBefore | Prepare to activate the annotation.
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.activeAnnotationBefore, (annotRender) => { //do something }) | ||||||||
activeAnnotation | Activate the annotation.
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.activeAnnotation, (annotRender) => { //do something }) | ||||||||
activeAnnotationAfter | Activate the annotation.
| ||||||||
activeMultipleAnnotations | Activate multiple annotations at once.
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.activeMultipleAnnotations, (annotRenders: Array<annotRender>) => { //do something }) | ||||||||
unActiveAnnotation |
| ||||||||
updateActiveAnnotation | Update the active annotations.
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.updateActiveAnnotation, (annotComponent) => { //do something }) | ||||||||
removeActiveAnnotationBefore | Delete the active annotation before.
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.removeActiveAnnotationBefore, (annotComponent) => { //do something }) | ||||||||
removeActiveAnnotationSuccess | The active annotation was deleted successfully.
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.removeActiveAnnotationSuccess, (annotComponent) => { //do something }) | ||||||||
removeActiveAnnotationFailed | Failed to delete active annotation.
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.removeActiveAnnotationFailed, (annotComponent) => { //do something }) | ||||||||
switchStateHandler | Switch stateHandler.
//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.
| ||||||||
snapModeChanged | Triggered after snap mode changed.
| ||||||||
distanceAnnotCreationStart | Triggered when the mouse drag starts in the process of creating a measurement.
| ||||||||
updateDistanceAnnot | Triggered when the mouse drag starts in the process of changing a measurement.
| ||||||||
distanceAnnotCreationEnd | Triggered when the measuring is complete and mouse is released.
| ||||||||
selectText | Information about the selected text.
//GET pdfViewer OBJECT FIRST. pdfViewer.eventEmitter.on(PDFViewCtrl.constants.ViewerEvents.selectText, (selectedTextSummary) => { //do something }) | ||||||||
annotationPermissionChanged | Triggered on an annotation permission changed.
| ||||||||
mouseEnter | Mouse-enter Event.
| ||||||||
mouseLeave | Mouse-leave Event.
| ||||||||
focusOnControl | Triggered when the field is focused.
| ||||||||
eSignCnShowAuthPromote | eSignCN event group | ||||||||
tapField | Triggered when the field is clicked. eSignCN event group end
| ||||||||
tapGraphicsObject | Triggered when the graphics object is clicked.
|