PSPDFKit Server has been deprecated and replaced by PSPDFKit Document Engine. All PSPDFKit Server and PSPDFKit for Web Server-Backed licenses will work as before and be supported until 15 May 2024 (we will contact you about license migration). 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.
Reboot your machine.
Verify that Docker works correctly by typing
docker infoin the terminal. Check that the output contains
OSType: linux. PSPDFKit Server is a Linux-based container and requires a Docker environment capable of running Linux containers.
pspdfkitimage from Docker Hub:
docker pull pspdfkit/pspdfkit
Use one of the following example projects:
The examples provide
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
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
dashboardand the password
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_URLenvironment variable in the
docker-compose.yamlfile and set it to an address that’s accessible from your device.
If you get an error, try installing
docker-compose.yamlseparately.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 the
docker infocommand or the
sudo docker infocommand.