This is the API entry point. The entire WebPDF code runs under this object.
Classes
Namespaces
- AccountInstance
- EventList
- FormPlugin
- ImageAnnotPlugin
- 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 callbackfunction 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 docViewerIdString The dom element id name to wrapper current WebPDFViewer.
optionParamsObject The optional parameters to initialize WebPDFViewer.
Properties
Name Type Argument Default Description licenseKeystring A data string that verifies the access to functionalities. The SDK cannot be used without this key.
languageString <optional>
Default the current browser language.
fontUrlString <optional>
http://webpdf.foxitsoftware.com/webfonts/ The font used to render PDF documents.
baseUrlString <optional>
The path to the current reference file.
scrollBarTypeNumber <optional>
0 for CUSTOM_SCROLL and 1 for NATIVE_SCROLL.
i18nPathString <optional>
Multilingual path.
appNameString <optional>
Custom Application Name.
cpdfAppNameString <optional>
Custom CPDF Application Name.
cpdfAppVersionString <optional>
Custom CPDF Application Version.
cwsVersionString <optional>
CWS API Server Version.
isInitI18nboolean <optional>
true false:Initialize yourself to multiple languages
toolbarConfigObject <optional>
Configuration options for toolbar. toolbar configuration tutorial
snapshotobject <optional>
Snapshot server configuration
Properties
Name Type Argument Default Description copystring <optional>
false if true, the image data will be copy to clipboard when copy button clicked, default: false.
imageServerPathstring Snapshot API path, this parameter is available only if
snapshot.copyis truerenderfunction A function to parse response data to image url, this parameter is available only if
snapshot.copyis true.Returns:
- Type
- Promise