FoxitPDFSDKforWeb v12.0.0
Foxit PDF SDK for Web
FacingPageViewMode Class Reference

Facing page view mode: displays pages side by side in a spread (default 2 per row), and switches one spread at a time. More...

Inheritance diagram for FacingPageViewMode:
IViewMode SinglePageViewMode

Static Public Member Functions

static extend (name:string, pagesPerRow:number)
 Creates a FacingPageViewMode subclass with a custom name and pages-per-row. More...
 
static getName ()
 Facing page mode name. More...
 
- Static Public Member Functions inherited from IViewMode
static getName ()
 The name of the view mode, also a unique identifier. More...
 

Additional Inherited Members

- Public Member Functions inherited from IViewMode
 constructor (docRender)
 Constructs a view mode instance. More...
 
 getCurrentPageIndex ()
 Obtains the current page index. More...
 
 getDeviceCurrentPosition ()
 Device offset of the viewport top-left relative to the page under that point. More...
 
 getFitHeight (index)
 Get the fit height. More...
 
 getFitWidth (index)
 Get the fit width. More...
 
 getNextPageIndex ()
 Obtains the next page index. More...
 
 getPrevPageIndex ()
 Obtains the previous page index. More...
 
 getVisibleIndexes ()
 Gets the index of the visible page. More...
 
 into (pageContainer, pageDOMs, currentPageIndex=0)
 Switch to this layout. More...
 
 jumpToPage (index, {x=0, y=0})
 Control how to jump to the page in this view mode. More...
 
 out ()
 Exit this layout.
 
 renderViewMode (pageRender, scale, rotate, width, height)
 The method that fires before drawing the outer frame of a page. More...
 

Detailed Description

Facing page view mode: displays pages side by side in a spread (default 2 per row), and switches one spread at a time.

Since
12.0.0

Member Function Documentation

◆ extend()

static FacingPageViewMode::extend (   name:string,
  pagesPerRow:number 
)
inlinestatic

Creates a FacingPageViewMode subclass with a custom name and pages-per-row.

Parameters
namestring - Unique view mode name for register / switchTo.
pagesPerRownumber - Pages displayed side-by-side in each spread.
Returns
typeof FacingPageViewMode
Since
12.0.0
const ThreePageFacing = PDFViewCtrl.viewMode.FacingPageViewMode.extend('facing-3-page-view-mode', 3);
pdfViewer.getViewModeManager().register(ThreePageFacing);
pdfViewer.getViewModeManager().switchTo(ThreePageFacing.getName());

◆ getName()

static FacingPageViewMode::getName ( )
inlinestatic

Facing page mode name.

Returns
string Default pages-per-row. Subclasses override to configure columns.
number
Since
12.0.0

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