Interface: Dialogs
Groups all the api actions related to the dialogs ui of the viewer.
Properties
thumbnailsSidebar
thumbnailsSidebar:
object
Groups all the api actions related to the dialogs thumbnailsSidebar.
addEventListener()
addEventListener: (
eventName
,fn
) =>void
Add an event listener to a thumbnail in the thumbnails sidebar being clicked.
Parameters
• eventName: "thumbnailClicked"
• fn
The callback to execute.
Returns
void
Example
PdfToolsViewerApi.dialogs.thumbnailsSidebar.addEventListener('thumbnailClicked', () => { console.log('callback') });
thumbnailClicked()
thumbnailClicked: (
pageNumber
) =>void
Trigger event indicating that a thumbnail sidebar has been clicked.
Parameters
• pageNumber: number
The pageNumber of the clicked thumbnail.
Returns
void
Example
PdfToolsViewerApi.dialogs.thumbnailsSidebar.thumbnailClicked(4);