Use JavaScript PDF Document Processing SDK without UI
Although WebViewer provides a UI to view and annotate documents, it also provides access to Apryse's SDK that allows you to perform document operations without a UI if necessary.
This is useful for areas of your app that needs additional document processing without viewing a document. Although there are performance drawbacks as this is done on the client-side, it can be critical as part of your app's flow.
Prerequisites
This guide assumes you will have downloaded WebViewer and at least set up your project to serve the static library files.
Get your Apryse trial key.
License Key
Apryse collects some data regarding your usage of the SDK for product improvement.
The data that Apryse collects include:
The names and number of API calls
The number of pages in a document
The version of the SDK
The language of the SDK
For clarity, no other data is collected by the SDK and Apryse has no access to the contents of your documents.
If you wish to continue without data collection, contact us and we will email you a no-tracking trial key for you to get started.
If you have not done so, please check out one of the following guides to get started:
WebViewer Core is the core for WebViewer. The usual script that would be required with the UI is webviewer.min.js. Using this script would automatically import and use the core. In a viewer-less scenario, we would only import the core script (webviewer-core.min.js; CoreControls.js prior to WebViewer 8.0) in the HTML. As of 10.1, we also import PDFNetLean.js here to include functions that come from PDFNet.js, but do not require fullAPI.
WebViewer requires web workers to function and work with documents. This is necessary regardless of the setup. Normally, this is done automatically via the path option in the WebViewer constructor. In a viewer-less scenario, we can load the workers with a simple JavaScript call:
1(async function() {
2 // Core namespace is now available on the window
You can check out the full guide on how to build your own UI .
Processing documents (Full API - PDFNet)
Another use case is to use the APIs to process documents in the client (browser). To gain access to the full API for more advanced document processing, there are a few additional steps to take:
Reference an additional script (PDFNet.js) in your HTML