Namespace: WebPDF

WebPDF

This is the API entry point. The entire WebPDF code runs under this object.

Classes

PDFDestination
Toolbar

Namespaces

AccountInstance
EventList
FormPlugin
NavigationComponent
UserPermission
ViewerInstance

Members


<static> version :String

The version number of WebPDF Viewer.

Type:
  • String
Example
alert( WebPDF.version );  // e.g. 'WebPDF beta 1.1'

Methods


<static> onReady(callback)

Triggers this callback before a document is loaded when the viewer is ready.

Parameters:
Name Type Description
callback function

The function triggered when the viewer is ready, before a document is loaded


<static> ready(docViewerId, optionParams)

The API entry.The function define to prepare the viewer.

Parameters:
Name Type Description
docViewerId String

The dom element id name to wrapper current WebPDFViewer.

optionParams Object

The optional parameters to initialize WebPDFViewer.

Properties
Name Type Argument Default Description
licenseKey string

A data string that verifies the access to functionalities. The SDK cannot be used without this key.

language String <optional>

Default the current browser language.

fontUrl String <optional>
http://webpdf.foxitsoftware.com/webfonts/

The font used to render PDF documents.

baseUrl String <optional>

The path to the current reference file.

scrollBarType Number <optional>

0 for CUSTOM_SCROLL and 1 for NATIVE_SCROLL.

i18nPath String <optional>

Multilingual path.

appName String <optional>

Custom Application Name.

isInitI18n boolean <optional>
true

false:Initialize yourself to multiple languages

toolbarConfig Object <optional>

Configuration options for toolbar. toolbar configuration tutorial

Returns:
Type
Promise