PDF Generator Configuration

Last modified by Eleni Cojocariu-testing account on 2026/08/21 17:04

Reference

When configuring PDF export, the "Generator" setting chooses the tool that produces the PDF:

generator-dropdown.png

The tool used as a PDF GeneratorDescriptionImage
"User Browser"The default setting. The PDF is generated client-side, by the print function of the user's own web browser, so it requires no external service such as Docker or a remote headless Chrome. The drawback is that the final PDF varies with the browser each user runs, and with its version.user-browser-generator.png
"Chrome Docker Container"The PDF is generated server-side, by a headless Chrome web browser running inside a Docker container on the same server as XWiki. The application handles the container itself:
  • pulling the Docker image if it is not found locally,
  • creating and starting the container if no existing container is available,
  • stopping the container when XWiki shuts down, if XWiki is the one that created it.
chrome-docker-container-generator.png
"Remote Chrome"The PDF is generated server-side, by a Chrome web browser running on another host. Use it to keep the export server-side without relying on Docker, or without granting XWiki access to Docker.remote-chrome-generator.png

Selecting one of the two server-side generators reveals its own settings:

SettingGeneratorDefaultDescription
"Chrome Docker Image""Chrome Docker Container"a pinned femtopixel/google-chrome-headless tagThe Docker image used to create the container running the headless Chrome. The default names an exact Chrome version rather than latest, because a Chrome upgrade changes the layout of the PDFs it produces.
"Chrome Docker Container Name""Chrome Docker Container"headless-chrome-pdf-printerThe name of the container running the headless Chrome. Set it to the name of a container you manage yourself to have XWiki reuse it instead of creating one.
"Docker Network""Chrome Docker Container"bridgeThe name or id of the Docker network the Chrome container is added to. Set it when XWiki itself runs inside a Docker container, so that the two containers can reach each other.
"Chrome Host""Remote Chrome"empty, and requiredThe host running the headless Chrome, specified either by its name or by its IP address.
"Chrome Remote Debugging Port"both9222The port number used for communicating with the headless Chrome.
"XWiki URI"bothhost.xwiki.internalThe base URI the headless Chrome uses to reach this instance, in particular the print preview Page. The host is required; the scheme (HTTP or HTTPS) and the port are optional and fall back to the ones of the URL that triggered the export. This setting replaces the deprecated XWiki Host configuration (export.pdf.xwikiHost).

FAQ

Is there any other way to configure the PDF generator?

Yes, you can configure the PDF generator by modifying the xwiki.properties file.

Related

Get Connected