Some test text!
The PDFTron Docker image is provided prebuilt and hosted through Dockerhub. This guide will go through using the prebuilt image and configuring a built image.
Prior to using this guide, your device should have Docker installed.
PDFTron offers the WebViewer Server container image and the load balancer built for WebViewer Server on DockerHub as an alternative to the manually built package available on our website. Run the following in your commands prompt/terminal interface to get started with WebViewer.
This command will pull and run the WebViewer Server image. Ensure you are using Linux Containers before running this command.
docker run -p 8090:8090 -e INCLUDE_DEMO='true' -d -e TRN_PDFNET_KEY=your_demo_key pdftron/webviewer-server:latest
The settings for the containers are controlled by environment variables. These can be specified by
-e [VARIABLE]=[VALUE] when calling
docker run or set inside of the
docker-compose.yml available directly from our website.
The following are the variables available for wv-loadbalancer.
INITIAL_NODE_P: Sets a node for HAProxy to load balance to, the variables can be named between the letters A and P for a max of 16 servers. The names passed to these node variables should equal the container names of any webviewer-servers that were started. If we have 2 containers named
wv-serverB then the load balancer should be run with these arguments:
-e INITIAL_NODE_A=wv-serverA -e INITIAL_NODE_B=wv-serverB
ENABLE_TCP_MANAGEMENT: 'true' or 'false'. If set to true, enables the TCP management socket at port 4893. This socket allows full control of the load balancer through TCP. If enabled, the port 4893 must not be enabled past your internal network to ensure security. Read more about HAProxy dynamic management here.
DISABLE_SSL: 'true' or 'false'. If set to true, disables HTTPs socket binding on the balancer. Useful in situations where the load balancer does not need to control SSL connections.
URL_PREFIX: 'true' or 'false'. Sets a URL prefix for accessing the server.
Most cloud services which support containers will able to pull these images into their infrastructure to make deploying easy. This is often done by passing the registry name
pdftron/webviewer-server:latest to the configuration of the infrastructure. We recommend those using the Docker image registry to use a versioned copy of the image, such as
pdftron/webviewer-server:1.1 to prevent any breaking changes to their infrastructure.
We also provide a load balancer which can attach to multiple Webviewer Servers on DockerHub. This load balancer will allow you to run multiple WebViewer Servers from one access point. Multiple WebViewer Servers can be attached to one load balancer by appending additional nodes to it through the INITIAL NODE argument and starting each WebViewer Server to match these INITIAL NODE names. Below is an example of how to do so.
docker network create wv-network docker run --net wv-network -d -e INCLUDE_DEMO='true' -e TRN_PDFNET_KEY=your_demo_key --name webviewer-serverA pdftron/webviewer-server:latest docker run --net wv-network -d -e INCLUDE_DEMO='true' -e TRN_PDFNET_KEY=your_demo_key --name webviewer-serverB pdftron/webviewer-server:latest docker run --net wv-network -p 8090:8050 -d -e INITIAL_NODE_A=webviewer-serverA -e INITIAL_NODE_B=webviewer-serverB pdftron/wv-loadbalancer:latest
Get the answers you need: Support