Skip to content
Use PSPDFKit for Web in a Webpack setup
Branch: master
Clone or download
Latest commit b5ab0c5 May 29, 2019

PSPDFKit for Web Example – Webpack

This example shows how to build a PSPDFKit for Web web application with webpack.

This example uses the Standalone version of PSPDFKit for Web distributed as an npm package.


Getting Started

git clone
cd pspdfkit-web-example-webpack

echo YOUR_LICENSE_KEY_GOES_HERE > ./config/license-key

NPM_KEY="YOUR_NPM_KEY_GOES_HERE" npm install --save${NPM_KEY}/latest.tar.gz

npm install
npm start

If you are using Windows make sure to set the environment variables accordingly. For this replace the line starting with PSPDFKIT_NODE_KEY="... with:

SET "PSPDFKIT_NODE_KEY=place your node key here"
npm install --save${PSPDFKIT_NODE_KEY}/latest.tar.gz

The example app is built in the ./dist folder and is now running on http://localhost:8080.

Upload a PDF either via the Select File button at top-left or by dropping a PDF into the page.

We put a sample PDF document in the assets folder of this project for you to try!

For further instructions please refer to our online guide available at

If you are using an evaluation license you can find the license key at

webpack configuration file

The webpack configuration file is located at ./config/webpack.js.

Development mode

To run the app in development mode run

npm run start:dev


This software is licensed under a modified BSD license.


Please ensure you signed our CLA so we can accept your contributions.

You can’t perform that action at this time.