FoxitPDFSDKforWeb  v10.0.0
Foxit PDF SDK for Web
ViewModeManager Class Reference

View Mode Manager
The default contains the following two viewmode
continuous-view-mode: Continuous page mode
single-page-view-mode: Single page mode. More...

Public Member Functions

 get (name=ContinuousViewMode.getName())
 Get view mode by name. More...
 
 getAll ()
 Gets all view modes. More...
 
 getCurrentViewMode ()
 Get current view mode. More...
 
 register (ViewMode)
 Reigster view mode. More...
 
 set (name)
 Just set the value, will not cause refreshing.
 
 switchTo (name)
 Switch to view mode by name. More...
 

Detailed Description

View Mode Manager
The default contains the following two viewmode
continuous-view-mode: Continuous page mode
single-page-view-mode: Single page mode.

// Switch to single page mode
pdfViewer.getViewModeManager().switchTo('single-page-view-mode');
// Switch to continuous page mode
pdfViewer.getViewModeManager().switchTo('continuous-view-mode');

Member Function Documentation

◆ get()

ViewModeManager::get (   name = ContinuousViewMode.getName())
inline

Get view mode by name.

Parameters
namestring - 'continuous-view-mode'
Returns
new<T extends IViewMode>(pdfViewer:PDFViewer)=>T - View mode class

◆ getAll()

ViewModeManager::getAll ( )
inline

Gets all view modes.

Returns
object - all view modes, keys are names, values are view mode classes.

◆ getCurrentViewMode()

ViewModeManager::getCurrentViewMode ( )
inline

Get current view mode.

Returns
new<T extends IViewMode>(pdfViewer:PDFViewer)=>T - view mode class

◆ register()

ViewModeManager::register (   ViewMode)
inline

Reigster view mode.

Parameters
ViewModeIViewMode
Returns
new<T extends IViewMode>(pdfViewer:PDFViewer)=>T - Viewmode class

◆ switchTo()

ViewModeManager::switchTo (   name)
inline

Switch to view mode by name.

Parameters
namestring - 'continuous-view-mode' View pages continuously with scrolling enabled
'multipage-view-mode' View pages side-by-side with continuous scrolling enabled

Foxit Software Corporation Logo
@2024 Foxit Software Incorporated. All rights reserved.