Adding to Your Project

This guide will walk you through adding PSPDFKit for Electron to your Electron project.

Accessing license information — for evaluation

After requesting an evaluation license, follow the PSPDFKit for Electron 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 https://customers.pspdfkit.com and navigate to the Your Licenses & Keys page.
  2. Locate your PSPDFKit for Electron license and click Download PSPDFKit for Electron.
  3. Follow the instructions in the Install with npm section below.

Install with npm

PSPDFKit for Electron is installed as an npm package. The package is securely hosted on our servers as a tarball, and its URL is unique to each customer and license. For each license, we generate an NPM_KEY, which is what makes a download link work.

If you want to evaluate PSPDFKit for Electron, be sure to [request an evaluation license][pspdfkit trial].

If you’re an existing customer, simply follow the instructions from the Install with npm tab in the download dialog of the customer portal — the tarball URL already includes your NPM_KEY.

Using the latest release:

1
yarn add https://customers.pspdfkit.com/npm/YOUR_NPM_KEY_GOES_HERE/latest.tar.gz
1
npm install --save https://customers.pspdfkit.com/npm/YOUR_NPM_KEY_GOES_HERE/latest.tar.gz

Note that when installing the latest version, you always get the most recent release, so expect a hash mismatch when a new version of PSPDFKit for Electron is released.

Installing latest is similar to having "pspdfkit": "*" in your package.json.

Pinning to a specific version (e.g. 2018.2.0):

1
yarn add https://customers.pspdfkit.com/npm/YOUR_NPM_KEY_GOES_HERE/2018.2.0.tar.gz
1
npm install --save https://customers.pspdfkit.com/npm/YOUR_NPM_KEY_GOES_HERE/2018.2.0.tar.gz

This will add a dependency with the name pspdfkit to your application’s package.json.

Now you can start using PSPDFKit for Electron from any JavaScript file that runs in your renderer process. Follow the Integration guide for your next steps.

Example Application

We’ve prepared a ready-to-use example project that will help you get started quickly.