WebViewer

WebViewer is a pure JavaScript library to annotate, view, and edit documents inside all major browsers.

Instantiation

You must instantiate WebViewer in order to access classes and APIs.

WebViewer({
  licenseKey: 'YOUR_LICENSE_KEY'
}, document.getElementById('viewer'))
  .then(function(instance) {
    var docViewer = instance.docViewer;
    var annotManager = instance.annotManager;
    // call methods from instance, docViewer and annotManager as needed

    // you can also access major namespaces from the instances as follows:
    // var Tools = instance.Tools;
    // var Annotations = instance.Annotations;
  });

See WebViewer for details.

Frequently used namespaces/classes

  • WebViewer - Main instantiation function used to create a WebViewerInstance.
  • WebViewerInstance - An instance of WebViewer. Contains most APIs and Namespaces.
  • DocumentViewer - A control class used for document viewing and operations.
  • AnnotationManager - A control class used for annotation managing.
  • Document - A class representing a document.
  • Annotations - A namespace containing annotation classes.
  • Tools - A namespace containing tool classes.
  • CoreControls - A namespace containing core control classes.
  • PDFNet - A namespace containing PDFNet classes (used in fullAPI option).