You can watch a step-by-step video to help you get started.
You can also download a ready-to-go sample on GitHub.
Prerequisites
Prior to starting, you should have already installed Node and npm.
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.
Integrate into your application
1. Install WebViewer NPM module
Run the following command in your Terminal or Command Line:
sh
1npm i @pdftron/webviewer
2. Copy static assets
Next we must copy the static assets required for WebViewer to run. The files are located in node_modules/@pdftron/webviewer/public and must be moved into a location that will be served and publicly accessible. In React, it will be public folder.
Inside of useEffect hook or componentDidMount lifecycle method initialize WebViewer. Ensure that the path property in the constructor points to where you copied static assets node_modules/@pdftron/webviewer/public in React public folder. Add your own license key in place of 'YOUR_LICENSE_KEY'.