Document Engine example projects
PSPDFKit Server has been deprecated and replaced by Document Engine. To start using Document Engine, refer to the migration guide. With Document Engine, you’ll have access to robust new capabilities (read the blog for more information).
PSPDFKit Server offers the following example projects:
These examples demonstrate how to integrate PSPDFKit Server with your backend.
To integrate PSPDFKit Server with your backend, set up an instance of PSPDFKit Server using the getting started guide that describes the necessary docker-compose.yml
file in detail.
-
Install and run Docker. Refer to the Choose a Docker Registry guide to learn about all the installation options.
-
Reboot your machine.
-
Verify that Docker works correctly by typing
docker info
in the terminal. Check that the output containsOSType: linux
. PSPDFKit Server is a Linux-based container and requires a Docker environment capable of running Linux containers. -
Pull the
pspdfkit
image from Docker Hub:
docker pull pspdfkit/pspdfkit
-
Use one of the following example projects:
The examples provide Dockerfile
and docker-compose.yml
files that work without additional configuration. To clone an example to your machine and switch to its directory, run one of the following commands:
git clone https://github.com/PSPDFKit/pspdfkit-server-example-nodejs.git cd pspdfkit-server-example-nodejs
git clone https://github.com/PSPDFKit/pspdfkit-server-example-rails.git cd pspdfkit-server-example-rails
If the command doesn’t work, try installing Git first.
-
If you have an activation key (also called a license key), add it to Docker using the code below. It’ll remain activated until you reset it. To start in trial mode without an activation key, skip this step.
ACTIVATION_KEY=YOUR_ACTIVATION_KEY_GOES_HERE docker-compose up
set ACTIVATION_KEY=YOUR_ACTIVATION_KEY_GOES_HERE docker-compose up
$env:ACTIVATION_KEY='YOUR_ACTIVATION_KEY_GOES_HERE'
docker-compose up
-
Open http://localhost:3000 in a browser. When the website asks your username, type something to proceed. Alternatively, open PSPDFKit Server’s dashboard at http://localhost:5000/dashboard and log in with the username
dashboard
and the passwordsecret
.
To stop the container, use the Control-C keyboard shortcut.
-
Optional: To test PSPDFKit for Web on different devices in your local network, edit the
PSPDFKIT_SERVER_EXTERNAL_URL
environment variable in thedocker-compose.yaml
file and set it to an address that’s accessible from your device.
If you get an error, try installing
docker-compose.yaml
separately.The following message might appear:ERROR: Couldn’t connect to Docker daemon at http+docker://localunixsocket - is it running?If so, check if the service is running using thedocker info
command or thesudo docker info
command.