Interface: PdfToolsViewerInterface
API for interacting with the PDF Viewer SDK, exposing core functionalities for document interaction, event handling, and UI management.
Properties
addEventListener()
addEventListener: (
eventName,callback) =>void
Adds an event listener for a specified event.
Parameters
• eventName: keyof EventMap
The name of the event to listen for.
• callback: () => string | (txt) => void | (annotation) => void | (annotation) => void | (annotation) => void | (pageNumber, point) => void | (pageNumber, point) => void | (cursor) => void | (pageNumber) => void | (rotation) => void | (inputDocument) => void | (componentName, payload?) => void | (fitMode) => void | (pageMode) => void | (zoom) => void | (visible?) => void | (visible?) => void | (visible?) => void | (visible?) => void | () => void | (visible?) => void | (selected, color) => void | (visible?) => void | (selected, color) => void | () => void | () => void | () => void | () => void | () => void | (active) => void | () => void | (pageNumber) => void | (active) => void | () => void | () => void | () => void | () => void | (error) => void | () => void | (options) => void | () => void | (active, options?) => void | (selected, color) => void | () => void | (options) => void | () => void | (options) => void | (active) => void | (stampType) => void | (annotation) => void | (annotation, error) => void | (annotation, locked) => void | (annotation, degrees) => void | (active) => void | (color) => void | (opacity) => void | (thickness) => void | (lineEnding, direction) => void | (annotation) => void | (annotation, error) => void | (annotation, locked) => void | (active) => void | (color) => void | (color) => void | (opacity) => void | (thickness) => void | (shapeType) => void | (annotation) => void | (annotation, error) => void | (annotation, locked) => void | (active, annotation?) => void | (triggerEl) => void | (triggerEl) => void | (triggerEl) => void | () => void | (annotation) => void | (annotation, locked) => void | (active, top?, left?) => void | (color) => void | (opacity) => void | (active, top?, left?) => void | (thickness) => void | (active, top?, left?, direction?) => void | (lineEnding) => void | (active, annotation?) => void | (triggerEl) => void | (triggerEl) => void | (triggerEl) => void | () => void | (annotation) => void | (annotation, locked) => void | (active, annotation?) => void | (annotation, locked) => void | (annotation, degree) => void | (annotation) => void | (active) => void | (searchResult) => void | () => void | (caseSensitive) => void | (regularExpression) => void | () => void
The callback function to execute when the event is triggered.
Returns
void
contextualMenus
contextualMenus:
ContextualMenus
Groups all the contextual menu-related API actions.
dialogs
dialogs:
Dialogs
Groups all the dialog-related API actions.
document
document:
Document
Groups all the document-related API actions.
documentView
documentView:
DocumentView
Groups all the documentView-related API actions.
file
file:
Files
Groups all the file-related API actions.
hideComponents()
hideComponents: (
components) =>void
Hides specified UI components in the Viewer.
Parameters
• components: HideableComponentConfigName[]
List of components to hide.
Returns
void
lineAnnotations
lineAnnotations:
LineAnnotations
Groups all the line annotations-related API actions.
overrideButtonBehavior()
overrideButtonBehavior: (
buttonName,eventName,callback) =>void
Overrides the behavior of a specific button.
Parameters
• buttonName: string
The name of the button to override.
• eventName: string
The name of the event to listen for.
• callback
The callback function to execute when the event is triggered.
Returns
void
popovers
popovers:
Popovers
Groups all the popover-related API actions.
removeEventListener()
removeEventListener: (
eventName,callback) =>void
Removes an event listener for a specified event.
Parameters
• eventName: keyof EventMap
The name of the event to stop listening for.
• callback: () => string | (txt) => void | (annotation) => void | (annotation) => void | (annotation) => void | (pageNumber, point) => void | (pageNumber, point) => void | (cursor) => void | (pageNumber) => void | (rotation) => void | (inputDocument) => void | (componentName, payload?) => void | (fitMode) => void | (pageMode) => void | (zoom) => void | (visible?) => void | (visible?) => void | (visible?) => void | (visible?) => void | () => void | (visible?) => void | (selected, color) => void | (visible?) => void | (selected, color) => void | () => void | () => void | () => void | () => void | () => void | (active) => void | () => void | (pageNumber) => void | (active) => void | () => void | () => void | () => void | () => void | (error) => void | () => void | (options) => void | () => void | (active, options?) => void | (selected, color) => void | () => void | (options) => void | () => void | (options) => void | (active) => void | (stampType) => void | (annotation) => void | (annotation, error) => void | (annotation, locked) => void | (annotation, degrees) => void | (active) => void | (color) => void | (opacity) => void | (thickness) => void | (lineEnding, direction) => void | (annotation) => void | (annotation, error) => void | (annotation, locked) => void | (active) => void | (color) => void | (color) => void | (opacity) => void | (thickness) => void | (shapeType) => void | (annotation) => void | (annotation, error) => void | (annotation, locked) => void | (active, annotation?) => void | (triggerEl) => void | (triggerEl) => void | (triggerEl) => void | () => void | (annotation) => void | (annotation, locked) => void | (active, top?, left?) => void | (color) => void | (opacity) => void | (active, top?, left?) => void | (thickness) => void | (active, top?, left?, direction?) => void | (lineEnding) => void | (active, annotation?) => void | (triggerEl) => void | (triggerEl) => void | (triggerEl) => void | () => void | (annotation) => void | (annotation, locked) => void | (active, annotation?) => void | (annotation, locked) => void | (annotation, degree) => void | (annotation) => void | (active) => void | (searchResult) => void | () => void | (caseSensitive) => void | (regularExpression) => void | () => void
The callback function to remove.
Returns
void
search
search:
Search
Groups all the search-related API actions.
shapeAnnotations
shapeAnnotations:
ShapeAnnotations
Groups all the shape annotations-related API actions.
showComponents()
showComponents: (
components) =>void
Shows specified UI components in the Viewer.
Parameters
• components: HideableComponentConfigName[]
List of components to show.
Returns
void
stampAnnotations
stampAnnotations:
StampAnnotations
Groups all the stamp annotations-related API actions.
stickyNotes
stickyNotes:
StickyNotes
Groups all the sticky notes-related API actions.
toolbar
toolbar:
Toolbar
Groups all the toolbar-related API actions.
topbar
topbar:
Topbar
Groups all the topbar-related API actions.