Skip to main content
Version: Version 5 beta

Interface: Toolbar

Groups all the API actions related to the toolbar UI of the Viewer.

Properties

annotations

annotations: AnnotationsInterface

Groups all the API actions related to the annotations sidebar.

Example

viewer.toolbar.annotations.emitToggleVisibility(true); viewer.toolbar.annotations.addEventListener('toggleVisibility', () => { console.log('callback') });


button

button: ToolbarButtonInterface

Groups all the API actions related to toolbar buttons.


fitMode

fitMode: FitModeInterface

Groups all the API actions related to the fit mode of the toolbar.


hamburgerMenu

hamburgerMenu: HamburgerMenuInterface

Groups all the API actions related to the hamburger menu.


outline

outline: OutlineInterface

Groups all the API actions related to the outline sidebar.

Example

viewer.toolbar.outline.emitToggleVisibility(true); viewer.toolbar.outline.addEventListener('toggleVisibility', () => { console.log('callback') });


pageMode

pageMode: PageModeInterface

Groups all the API actions related to the page mode of the toolbar.


setFitMode()

setFitMode: (fitMode) => void

Sets the fit mode of the PDF viewer.

Parameters

fitMode

FitMode

The fit mode to set.

Returns

void


setPageMode()

setPageMode: (pageMode) => void

Sets the page mode of the PDF viewer.

Parameters

pageMode

PageLayoutMode

The page mode to set.

Returns

void


setZoom()

setZoom: (zoom) => void

Sets the zoom level of the PDF viewer.

Parameters

zoom

number

The zoom level to set.

Returns

void


thumbnails

thumbnails: ThumbnailsInterface

Groups all the API actions related to the thumbnails sidebar.

Example

viewer.toolbar.thumbnails.emitToggleVisibility(true); viewer.toolbar.thumbnails.addEventListener('toggleVisibility', () => { console.log('callback') });


zoom

zoom: ZoomInterface

Groups all the API actions related to the zoom functionality of the toolbar.