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

Layout of page view interface. More...

Inherited by SinglePageViewMode.

Public Member Functions

 constructor (docRender)
 
 getCurrentPageIndex ()
 Obtains the current page index. 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)
 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...
 

Static Public Member Functions

static getName ()
 The name of the view mode, also a unique identifier. More...
 

Detailed Description

Layout of page view interface.

Member Function Documentation

◆ constructor()

IViewMode::constructor (   docRender)
inline
Parameters
docRenderPDFDocRender
Since
9.0.0

◆ getCurrentPageIndex()

IViewMode::getCurrentPageIndex ( )
inline

Obtains the current page index.

Returns
number

◆ getFitHeight()

IViewMode::getFitHeight (   index)
inline

Get the fit height.

Parameters
indexnumber - page index
Returns
number|Promise<number> -

◆ getFitWidth()

IViewMode::getFitWidth (   index)
inline

Get the fit width.

Parameters
indexnumber - page index
Returns
number|Promise<number> -

◆ getName()

static IViewMode::getName ( )
inlinestatic

The name of the view mode, also a unique identifier.

Returns
string -

◆ getNextPageIndex()

IViewMode::getNextPageIndex ( )
inline

Obtains the next page index.

Returns
number -

◆ getPrevPageIndex()

IViewMode::getPrevPageIndex ( )
inline

Obtains the previous page index.

Returns
number -

◆ getVisibleIndexes()

IViewMode::getVisibleIndexes ( )
inline

Gets the index of the visible page.

Returns
number[] - [1, 2]

◆ into()

IViewMode::into (   pageContainer,
  pageDOMs 
)
inline

Switch to this layout.

Parameters
pageContainerHTMLElement -
pageDOMsArray<HTMLElement> -

◆ jumpToPage()

IViewMode::jumpToPage (   index,
  {x=0, y=0} 
)
inline

Control how to jump to the page in this view mode.

Parameters
indexnumber - page index
offsetobject - The offset in the upper left corner
offset.xnumber - The X-axis offset in the upper-left corner of the page
offset.ynumber - The Y-axis offset in the upper-left corner of the page

◆ renderViewMode()

IViewMode::renderViewMode (   pageRender,
  scale,
  rotate,
  width,
  height 
)
inline

The method that fires before drawing the outer frame of a page.

Parameters
pageRenderPDFPageRender -
scalenumber - page scale
rotatenumber - page rotation
widthnumber - The display width of the page
heightnumber - The display height of the page

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