Some test text!

WebViewer Server Container on Azure


Quick Start with Web Apps for Containers
Alternate Azure Setup Options
Building on a Linux VM
Building Container Instances
Building the Azure Image Registry

WebViewer Server can be used on Microsoft Azure. This guide details several methods of starting WebViewer Server on Azure.

linkQuick Start with Web Apps for Containers

This section specifies how to build a Web App server for containers on Azure. Azure Web Apps provide you a fully managed environment for hosting web servers. This will be the easiest way to get setup on Azure.

  1. Through the Azure Dashboard create a new Web Apps for Containers resource on Azure.

  2. On the resource creation screen, configure the settings of your server.

    • Type in a name for your app, this will also be the domain name for your server.
    • Set the OS option to Linux.
  3. Click Configure Container.

    • In the new page, click DockerHub.
    • In the field Image and optional tag type pdftron/webviewer-server:latest. Click apply.
    • Once returned to the main page, click Create.

You will be brought to an Overview page, if you wish to access the container it will be available under the URL field. You can access the demo application built in by using URL/demo?s to access it. It will take a few minutes for the server to become available after the initial creation is complete.

You may also add a key to the container and control any other settings as listed in our Docker image guide. Go to Application Settings and under the heading Application Settings select Add new setting. Set the name to your setting and the value to the desired value, like such:

`TRN_PDFNET_KEY demo:12345`

It is also possible to build the WebViewer Server container yourself and host it on Azure to be used with Web Apps, to do so follow this guide.

linkAlternate Azure Setup Options

linkBuilding on a Linux VM

To build the WebViewer Server on a Linux VM, follow this guide on building docker compose images alongside our guide on building the WebViewer Server image.

  • If building with the Azure VM, you may have to change the version specifier in the docker-compose.yml file to version:"2.0" or update docker-compose depending on the VM used.

linkBuilding Container Instances

Building on a Container Instance allows you more flexibility in usage but does not offer the fully integrated environment that a Web App server provides.

  1. Navigate to Create a resource in the Azure portal and search for Container Instances, once you've found it select it and create.
  2. Set your Container image type to Public. In the Container image field type pdftron/webviewer-server:latest.
  3. Click OK
  4. The Configuration page should now be shown.

    • Set Port to 8090
    • Set OS Type to Linux
    • Set each Environment Variable to the variables you use under the environment section of the docker-compose.yml for example: "INCLUDE_DEMO":"true"
  5. Hit OK twice more and the container should now be deploying.

If you included the demo in this build, you should now be able to access the demo at container_instance_address:8090/demo?s A private Azure image registry can also be used here.

linkBuilding the Azure Image Registry

The image registry is responsible for serving built container images on Azure. This can be done if the particular image of WebViewer Server you require is not available on Docker. This registry can be used when building Container Instances or Web Apps for Containers.

Microsoft also provides a more detailed guide on this process you can access here.

  1. Start by navigating to Create a resource in the Azure portal and search for Container Registry, once you've found it select it and create.
  2. Fill in the fields with settings appropriate to your Azure account. Ensure the Admin User is enabled.
  3. Deploy the Registry and wait for it to be created. Once it has been completed move to the next step.
  4. Go to your registry in your resources tab and find your username and password. It will be under Settings > Access Keys. You will need the username and password when pushing the image. Next go to Overview and find the Login Server, you will also need this when pushing the image.
  5. Install Docker and Docker Compose on your machine.
  6. Download our WebViewer Server package from here, extract it to a directory and open a terminal in its path.
  7. From your terminal run the following commands:

    • docker-compose build - wait for this to complete, it will build the WebViewer Server image.
    • docker images - you should now see an image with the words pdfd-tomcat in its IMAGE ID. Copy this IMAGE ID
    • docker login -u yourusername -p yourpassword yourloginserver - Logs your machine into the Azure Registry.
    • docker tag IMAGE_ID yourloginserver/imagename:latest - where imagename is what you wish to name your container. This tags the image to the Azure Registry.
    • docker push yourloginserver/imagename:latest - this will push the WebViewer Server.
  8. You now have a pushed image on your Container Registry. You can move on to building your server.

Get the answers you need: Support


Quick Start with Web Apps for Containers
Alternate Azure Setup Options
Building on a Linux VM
Building Container Instances
Building the Azure Image Registry