OpenOlat can generate PDFs, e.g. for downloadable test results documents or certificates. In order to generate those PDFs, a PDF service must be installed and properly in the OpenOlat administration section. We use AthenaPDF for this purpose.
AthenaPDF allows us to use HTML as the description language for PDFs and to style the PDF with simple print CSS rules using the powerful Google Chrome render engine.
A benefit of this approach is that the styling of the generated PDFs can easily be customised using the theme mechanism.
Run AthenaPDF in Docker
Start AthenaPDF as a docker container with a command like this:
docker run --shm-size 2G -p 8090:8080 -d --security-opt seccomp=unconfined -e WEAVER_MAX_CONVERSION_QUEUE=5000 -e WEAVER_MAX_WORKERS=10 -e WEAVER_AUTH_KEY=<my auth key> -e WEAVER_ATHENA_CMD='athenapdf --stdout --delay 5000' --restart always arachnysdocker/athenapdf-service
--delay 5000depends on the complexity of math formulas used in tests when printing test results
-d --security-opt seccomp=unconfined-d --security-opt seccomp=unconfinedis of course not recommended but often necessary
Make sure you have enough RAM assigned to the docker container.
Administration > External Tools > PDF generator
- The URL is the URL of your docker container
- The key is the
<my auth key>that you used in the launch command above
Make sure the AthenaPDF docker is only reachable by the IP address of your OpenOlat instance and to block all other requests. The PDF service is only use by OpenOlat to generate the PDF, the delivery of the PDFs is done by OpenOlat. Client never need to call AthenaPDF.