Sign inSign up

realobjects/pdfreactor-beta

By realobjects

Updated over 2 years ago

PDFreactor is a formatting processor for HTML to PDF conversion. This is the beta branch.

Image
0

100K+

realobjects/pdfreactor-beta repository overview

What is PDFreactor?

PDFreactor is a powerful formatting processor that enables server-side PDF conversion from HTML 5 documents using CSS to define page layout and styles. You can dynamically generate PDF documents such as reports, invoices, statements and others on-the-fly.

By implementing the W3C specification for Paged Media and print, PDFreactor provides great control over the paged output via CSS. It is very easy to set page sizes, margins and pagination for specific elements, page headers and footers. It enables you to set PDF specific information, to generate outlines and links for your documents and even to add meta information about the author or keywords.

This docker image provides a ready-to-use PDFreactor Web Service, which can then be used to convert HTML to PDF via the REST API or one of the API wrappers available at www.pdfreactor.com.

This docker image is provided "as-is", without any warranty or support.

The software "PDFreactor" contained in this image is a commercial product and subject to the PDFreactor Software License Agreement. To use PDFreactor in a production environment, an appropriate license is required.

For more information about PDFreactor, please visit www.pdfreactor.com.

How to use this image

$ docker run -d -p 8080:9423 realobjects/pdfreactor-beta

  This will map the PDFreactor Web Service running in the docker container on port 9423 to port 8080 of the host system. You then can access the PDFreactor Web Service on this port on your host system through any of the PDFreactor REST API wrappers, for example using the JavaScript wrapper:

var pdfReactor = new PDFreactor("http://yourhost.com:8080/service/rest");

  For details, please see Using the PDFreactor Web Service in the PDFreactor Integration Manual.

Further configuration

$ docker run -d -p 8080:9423 -v /your/config:/ro/config realobjects/pdfreactor-beta

  We recommend mapping a volume from your host system to /ro/config, since you can then use this volume to set the license, fonts and configuration of PDFreactor.

Mapping volumes and user permissions

The PDFreactor Web Service running in the docker container is executed with the user pruser. This user was created with the group ID 555. This must be taken into account when mapping a volume from your host system to the container. If the user pruser needs write access to the mapped volume, the easiest way is to make sure the volume mapped on the host directory is writable by users in the group with the ID 555.

Note: on most Docker installations, the group with the ID 555 will correspond to the docker group, so attributing the volume to share to the docker group and enabling write permission for this group should ensure the volume is writable by the PDFreactor Web Service running in the container in most cases.

If you need more fine-grained control over user permissions and your Docker version supports it, we recommend using Docker user namespaces.

Setting a license key

PDFreactor will run in evaluation mode when no license key is used. By default, it will look for a license key in /ro/config/licensekey.txt. You can mount a license key from your host volume to this path to set a license key for PDFreactor.

If you do not have a license key, you can obtain a free personal license for your personal, non-commercial license. For commercial projects, you can request an evaluation license or purchase a license.

Custom fonts

PDFreactor looks for fonts in /ro/config/fonts. If you would like to use any fonts that are not available by default in PDFreactor, you will need to place your fonts in the fonts subdirectory of the config volume you mapped. These fonts will then automatically be available to PDFreactor.

Additional server configuration

Additional configuration options for the server can be specified for the PDFreactor Web Service. These are either parameters the client should not or cannot influence, and they affect all conversions.

These parameters can be set by placing a file called pdfreactorwebservice.config in the volume mapped as /ro/config (or by mapping /ro/config/pdfreactorwebservice.config directly.

In addition, the memory and Java system properties for the PDFreactor Docker container can also be specified by passing an environment variable called "JAVA_OPTIONS" to the "docker run" command when starting your PDFreactor container. For example:

$ docker run -d -p 8080:9423 -e JAVA_OPTIONS="-Xmx2g -Dcom.realobjects.pdfreactor.webservice.threadPoolSize=4" realobjects/pdfreactor-beta

  The example above shows how to specify a maximum memory heap size of 2g as well as well a "threadPoolSize" of 4 when running the PDFreactor container.

Note that if you are using Docker Compose, you can of course also specify the "JAVA_OPTIONS" environment variable using the "environment" key in your docker-compose.yml:

version: '2'

services:
 pdfreactor-beta:
   container_name: pdfreactor-beta
   ports:
    - "86:9423"
   image: "realobjects/pdfreactor-beta"
   environment:
     JAVA_OPTIONS: "-Xmx2g -Dcom.realobjects.pdfreactor.webservice.threadPoolSize=4"

  For details about the available server parameters, see the Server Parameters chapter in the manual.

Resource constraints

Since the PDFreactor CPU license is based on CPU cores, you may want to limit the number of CPU cores available to your container according to the number supported by your license. To do so, you can use the cpuset-cpus flag of the docker run command. For example, to limit your container to 4 CPU cores (equivalent to 1 CPU license pack):

$ docker run --cpuset-cpus="0-3" -d -p 8080:9423 realobjects/pdfreactor-beta

You can also specify other resource limitations (such as memory) as described here.

Licensing

The software "PDFreactor" contained in this image is a commercial product and subject to the PDFreactor Software License Agreement. To use PDFreactor, an appropriate license is required.

You may obtain a free personal license for your personal, non-commercial purpose. For commercial projects, you can request an evaluation license or purchase a license.

Further third-party licensing information is provided in the /ro/pdfreactor/license directory in the PDFreactor image.

PDFreactor is a registered trademark of RealObjects GmbH.

Beta information

This is the beta branch of PDFreactor. This image can be used to preview new features, fixes and changes. Use at your own risk. Do not use in production.

Tag summary

Content type

Image

Digest

sha256:1319bebe2

Size

361.7 MB

Last updated

over 2 years ago

docker pull realobjects/pdfreactor-beta