Adding to Your Project

This guide will walk you through adding PSPDFKit for Web to your project for standalone deployment.

Accessing license information — for evaluation

After requesting an evaluation license, follow the PSPDFKit for Web trial link in the email you received. This will automatically fill in the license information in the following examples on this page.

Accessing license information — for existing customers

  1. In your web browser, log in to and navigate to the Your Licenses & Keys page.

  2. Locate your PSPDFKit for Web license and click Download PSPDFKit for Web to see all the download options.

  3. Depending on how you want to install the package, follow the instructions from either the Manual Download or Install with npm sections below.

Manual Download

If you want to add PSPDFKit for Web manually, select the Download tab in the download dialog of the trial and click on the download button.

The download will start immediately and will save a zip archive like to your computer.

Once the download is complete, extract the archive and copy the entire contents of its dist folder to your project’s folder.

Install with npm

PSPDFKit for Web can also be installed via npm. This will add a dependency with the name pspdfkit to your application’s package.json.

Always Use the Latest Release:

yarn add pspdfkit
npm install --save pspdfkit

Pinning to a Specific Version (e.g. 2018.2.0):

yarn add pspdfkit@2018.2.0
npm install --save pspdfkit@2018.2.0

Copy the PSPDFKit for Web Assets

In order for PSPDFKit for Web to work, you will need to copy the directory containing all the required library files (artifacts) to your project folder and serve them from within the same folder of your application module that requires pspdfkit.

For example, let’s assume that pspdfkit is required in the main application file, src/index.js:

// src/index.js
import PSPDFKit from "pspdfkit";

// src/index.js
var PSPDFKit = require("pspdfkit");


The application is built into a ./dist folder, so the directory containing the PSPDFKit for Web artifacts must be copied to the same dist folder:

cp -R ./node_modules/pspdfkit/dist/pspdfkit-lib ./dist
ls ./dist  # -> index.js pspdfkit-lib/

We highly recommend using a tool or module bundler like webpack to automate this process.

If you run into issues, please refer to our Troubleshooting guide.

Using Angular? See here for information on integration.

Next Up: Integrating PSPDFKit for Web

In fact, you may want to check out our sample application built with webpack.