| FoxitPDFSDKforWeb v11.0.4 Archives Foxit PDF SDK for Web

Overview

The API Reference contains detailed description for each class in the Foxit PDF SDK. Use the API Reference to find constructor options as well as properties, methods and events for each class, enum and interface. Of course, JS doesn't have the concept of an interface and enum.

For convenience, here we use interface to describe the dict type parameters of some methods and constructors, and we also use enum to describe the lists of constants organized into an object.

All classes and interfaces in the API are orgnaized in modules. To find the reference page for a specific class or method or an attribute name, type all or part of its name in the box in the upper right.

Some sample code appears in some API descriptions. Due to the length of the text, the sample code is often just a snippet of complete code. There will be some undefined variables. Here are some common variables and its explanations:

- `pdfui`: the instance of PDFUI class in UIExtension module;
- `pdfviewer`: the instanceof PDFViewer class in PDFViewCtrl module;

Note
  PDFUI class is inherit from PDFViewer class, but this is a special case. This inheritance relationship is not a general inheritance. PDFUI only inherits the method declaration and actually delegates the PDFViewer instance. So you cannot access PDFViewer properties through PDFUI instance directly. Due to the internal implementation mechanism, the methods on the PDFViewer are called asynchronously on the PDFUI instance, and the return value will be Promise. For Example:
  pdfviewer.getCurrentPDFDoc(); // returns PDFDoc
  pdfui.getCurrentPDFDoc(); // returns Promise<PDFDoc>;
  In addition, you can also get a PDFViewer instance asynchrounously via the PDFUI.getPDFViewer method:
  pdfui.getPDFViewer().then(function(pdfviewer) {
  pdfviewer.eventEmitter.addEventListener('event type'); // you can access pdfviewer's properties now.
  pdfviewer.getCurrentPDFDoc(); // PDFDoc
  });

@2025 Foxit Software Incorporated. All rights reserved.