Some test text!

WebViewer Server Configuration Options

Contents

Server build configuration
Enabling container features
Adding self signed certificates to WebViewer Server
Server run configuration
Customize server URL
Support for externally mapped static data drives
Relative URL
URL root restriction
Same domain cookie forwarding
Access Control
Client stickiness refresh
Configuring the maximum age of the local cache
Configuring the maximum size of the local cache
Disable client side PDF access
Debug: disable client side rendering
Debug: disable HTTPS

In this document you will find all available WebViewer Server configuration options. All the options here are configured within the docker-compose.yml file.

Setting docker variables
When modifying Docker arguments and environment variables, booleans must be surrounded by single quotes, in this manner: 'true' or 'false'

linkServer build configuration

The options here require a rebuild of the container which can be done using docker-compose build.

linkEnabling container features

In order to adjust the capabilities of the built container, see the following options under arguments in docker-compose.yml:

  • INCLUDE_DEMO - if true, enables a demo application at [your-website]/demo?s
  • HTML_SUPPORT - if true, enables HTML conversion support.
  • LIBRE_SUPPORT - if true, enables Libre Office conversion support.
  • CAD_SUPPORT - if true, enables CAD conversion support.

Disabling any of these options will lower the disk space the built WebViewer Server uses.

linkAdding self signed certificates to WebViewer Server

Your network may use self signed certificates in the file servers WebViewer Server will fetch files from. WebViewer Server will fail unless the certificates are imported into the container. You can do so by placing your public certificates in the include_certs/ directory and rebuilding. The certificates in this directory will be directly imported into WebViewer Server's Java certificates.

linkServer run configuration

The options here can be configured by restarting the container with any changes. This can be done by restarting the container through docker-compose restart.

Server configuration is most easily done via docker-compose.yml, located in the root of the WebViewer Server zip. The configuration is handled through environment variables set in the container, and they are as follows:

linkCustomize server URL

To access the server from a different internal URL, adjust the URL_PREFIX options in docker-compose.yml. For example, with the option value URL_PREFIX: custom-prefix, the demo would be available at http://localhost:8091/custom-prefix/demo/?s

linkSupport for externally mapped static data drives

It is possible to map the statically served data generated by the container to an external volume. The external folder must be granted full write access. See the commented out volumes: sections in both docker-compose.yml and docker-compose_load_balance.yml. Please be aware that the performance of this volume is critical to the performance of the server in general, and that the server operates under the assumption that the files will not be modified or locked by another process.

linkRelative URL

If the server container has the environment variable TRN_FETCH_DEFAULT_BASE_ADDR set, any incoming URL to the server will be TRN_FETCH_DEFAULT_BASE_ADDR + the incoming url when the server attempts to fetch it.

linkURL root restriction

If the server container has the environment variable TRN_FETCH_REQUIRED_URL_ROOT set, then each URL will be checked against its value before initiating any fetch routine. You may specify more than one possible URL root by seperating addresses with semicolons:

TRN_FETCH_REQUIRED_ROOT: www.test.com;www.pdftron.com;www.google.com

This check is done after any URL alteration performed due to the above TRN_FETCH_DEFAULT_BASE_ADDR option. For example, if TRN_FETCH_REQUIRED_URL_ROOT == my.domain.com/subpath, then the document http://my.domain.com/subpath/doc.pdf would be be allowed, but both http://my.domain.com/doc.pdf and http://my.other.domain.com/subpath/doc.pdf would fail. The protocol is not part of this check, and will be ignored if it is included in TRN_FETCH_REQUIRED_URL_ROOT.

linkSame domain cookie forwarding

If the server container has specified TRN_FORWARD_CLIENT_COOKIES as true, cookies a client has received from another server on the same domain will be shared with the WebViewer Server. This can allow cookie based authorization schemes to pass their cookies for the server to use.

linkAccess Control

Locks user document links to user sessions so they are inaccessible to other users with the document link. Set TRN_ENABLE_SESSION_AUTH to true to enable this feature.

During the course of normal operation, WebViewer server will generate static content like rendered pages or document metadata and make it accessible to clients via an obfuscated URI. While this link is unguessable, it is not access-limited by default -- if a client shares or leaks the link, it could be accessible by third parties. By enabling the option, it will ensure that these URL are only to clients with currently connected WV sessions. This will add a small amount of overhead to each connection, and hinder the viewing of thumbnails in the demo application.

linkClient stickiness refresh

If running the server in a distributed environment we offer an argument for improving user stickiness when using cookies to manage stickiness. Set TRN_BALANCER_COOKIE_NAME to the name of your stickiness cookie. Once set, WebViewer will delete the stickiness cookie whenever opening a new document. This allows users to only be stuck on a particular server on a per document basis.

In order to use this option your environment must allow WebViewer Server to delete cookies server side.

linkConfiguring the maximum age of the local cache

TRN_MAX_CACHE_AGE_MINUTES determines how long the local document cache will be kept before deletion. It accepts a number in minutes for deletion time.

linkConfiguring the maximum size of the local cache

TRN_MAX_CACHED_MB to configure the maximum size of the local cache before a forced deletion will occur. This should be set to 10% lower than the available space to WebViewer Server. Accepts a number in megabytes.

linkDisable client side PDF access

Setting the environment variable TRN_DISABLE_CLIENT_PDF_ACCESS will prevent the server from sending the PDF directly to the client, preferring other display modes instead (like server-side image rendering or .xod). Intended to protect sensitive documents by ensuring that only derived data (like rendered pages) are ever sent to the client.

linkDebug: disable client side rendering

Setting the environment variable TRN_DEBUG_DISABLE_CLIENT_BACKEND_SWITCH in the server container will cause webviewer to stick with the server-rendering image backend and not switch to a more efficient client side option at any point. This option is for debugging only, as it may be removed in a future version.

linkDebug: disable HTTPS

If the environment variable TRN_FETCH_DOWNGRADE_HTTPS is set, then all fetches originating from the docker server will be made as http, rather than https.

Get the answers you need: Support

Contents

Server build configuration
Enabling container features
Adding self signed certificates to WebViewer Server
Server run configuration
Customize server URL
Support for externally mapped static data drives
Relative URL
URL root restriction
Same domain cookie forwarding
Access Control
Client stickiness refresh
Configuring the maximum age of the local cache
Configuring the maximum size of the local cache
Disable client side PDF access
Debug: disable client side rendering
Debug: disable HTTPS