celsothomsen / pspdfkit-web-example-webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PSPDFKit for Web – webpack example

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 npm package.

Prerequisites

  • Node.js (with NPM)
  • A valid PSPDFKit for Web license

Getting Started

git clone git@github.com:PSPDFKit/pspdfkit-web-example-webpack.git
cd pspdfkit-web-example-webpack

echo "place your license key here" > ./config/license-key

PSPDFKIT_NODE_KEY="place your node key here" npm install --save https://customers.pspdfkit.com/npm/${PSPDFKIT_NODE_KEY}/latest.tar.gz

npm install
npm start

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 https://pspdfkit.com/guides/web/current/standalone/adding-to-your-project#toc_install-with-npm

If you are using an evaluation license you can find the license key at https://pspdfkit.com/guides/web/current/standalone/integration/#toc_example-application

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

Contributing

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

About


Languages

Language:JavaScript 85.5%Language:CSS 11.8%Language:HTML 2.7%