| FoxitPDFSDKforWeb v11.0.6 Archives Foxit PDF SDK for Web

Public Member Functions | List of all members
PDFViewPreference Class Reference
PDF

## Public Member Functions
| getPageLayout ()
| Get the page layout of the document. More...
| getPageMode ()
| Get page mode of the document. More...
| setPageLayout (layout)
| Set the page layout to specifies how the document shall be displayed when opened.. More...
| setPageMode (mode)
| Set page mode to specifies how the document shall be displayed when opened. More...

## Detailed Description

PDF ViewPreference object

Since
  11.0.0

## Member Function Documentation

## ◆ getPageLayout()

PDFViewPreference::getPageLayout | ( |  | ) |
| inline

Get the page layout of the document.

Returns
  PageLayout - The page layout.

Since
  11.0.0

Example
  function example(PDFViewPreference) {
  let res = PDFViewPreference.getPageLayout();
  }

## ◆ getPageMode()

PDFViewPreference::getPageMode | ( |  | ) |
| inline

Get page mode of the document.

Returns
  PageMode - The page mode.

Since
  11.0.0

Example
  function example(PDFViewPreference) {
  let res = PDFViewPreference.getPageMode();
  }

## ◆ setPageLayout()

PDFViewPreference::setPageLayout | ( |  | layout | ) |
| inline

Set the page layout to specifies how the document shall be displayed when opened..

Parameters

  layout | PageLayout - The page layout.

Since
  11.0.0

Example
  async function example(PDFViewPreference) {
  await PDFViewPreference.setPageLayout(UIExtension.PDFViewCtrl.PDF.constant.PageLayout.SinglePage);
  }

## ◆ setPageMode()

PDFViewPreference::setPageMode | ( |  | mode | ) |
| inline

Set page mode to specifies how the document shall be displayed when opened.

Parameters

  mode | PageMode - The page mode.

Since
  11.0.0

Example
  async function example(PDFViewPreference) {
  await PDFViewPreference.setPageMode(UIExtension.PDFViewCtrl.PDF.constant.PageMode.UseOutlines);
  }

@2025 Foxit Software Incorporated. All rights reserved.