PSPDFKit for Web comes with two example projects — one written in Node.js, and another one in Ruby on Rails — to demonstrate how to integrate server-backed deployment. Furthermore, we provide an example of how to use Webpack to build a project that uses PSPDFKit for Web Standalone.
We currently don’t provide example applications for other languages (ASP.NET, PHP, Python, etc.). You can look into our existing examples and use the guides to build your own integration.
Node.js or Ruby on Rails (Server-Backed Deployment)
This example shows how to integrate PSPDFKit for Web into a Node.js or Ruby on Rails app.
Both the examples include the PSPDFKit bundle in the head via the script tag. However, you can also use the PSPDFKit npm package with a module bundler, like in the standalone examples.
These steps show how to get the example apps, as well as PSPDFKit Server, up and running using Docker and Docker Compose. You can refer to the README of the individual examples for instructions on starting them outside of Docker.
Make sure you have Docker installed and running.
On macOS, we recommend the most recent version of Docker for Mac.
On Windows, we recommend the most recent version of Docker for Windows.
Log in to the private PSPDFKit Docker registry:Copy
docker login -u YOUR_DOCKER_USERNAME_GOES_HERE -p YOUR_DOCKER_PASSWORD_GOES_HERE docker.pspdfkit.com docker pull docker.pspdfkit.com/pspdfkit:latest
Get one of our example apps.
The examples provide a
docker-compose.ymlfile and a
Dockerfilethat will work without additional configuration:
Run the container:
ACTIVATION_KEY=YOUR_ACTIVATION_KEY_GOES_HERE docker-compose up
For comprehensive instructions on how to install and run the example projects, please refer to the README in the repos.
React App (Standalone Deployment)
This is an example project for PSPDFKit for Web demonstrating how to embed it into a React app bootstrapped with Create React App. It shows how to install the PSPDFKit package with npm or yarn and consume it in your host application.
The README in the repository will guide you through the setup steps.
webpack (Standalone Deployment)
Please refer to our Adding to Your Project guide for further information on how to obtain a license key.
To install and run the examples, please refer to the README in the repository.