cogConverts from LaTeX to PDF
TypeJAR
CategoryAPI
Developed by

Vincent Massol, Thomas Mortagne

Active Installs18
Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager

Description

Generate a PDF by exporting to LaTeX and then using a docker image to perform the conversion to PDF.

Configuration

The following configuration parameters can be provided in xwiki.properties, shown here with default values:

## Docker image name and tag to use
latex.pdf.dockerImageName = blang/latex:ubuntu

## Command to execute in the docker container to generate the PDF
## Executed twice to have 2 compilation passes, in order to properly generate the Table of Content for example.
latex.pdf.dockerCommands = pdflatex -shell-escape index.tex; pdflatex -shell-escape index.tex

If you want to see the execution logs from the dockerCommands used, set the org.xwiki.contrib.latex.internal.pdf logger to the DEBUG level in the Logging Application. For example:

debuglogging.png

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.


The conversion uses Docker and thus you need to have Docker installed on the server machine where XWiki runs.

On some OS you may need to make sure that you have the DOCKER_HOST environment variable defined for the XWiki LaTeX PDF extension to have a working Docker setup.

Dependencies

Dependencies for this extension (org.xwiki.contrib.latex:latex-pdf 1.13.1):

  • org.xwiki.commons:xwiki-commons-component-api 12.10
  • org.xwiki.platform:xwiki-platform-configuration-default 12.10
  • com.github.docker-java:docker-java-core 3.2.7
  • com.fasterxml.jackson.core:jackson-annotations 2.11.3
  • com.fasterxml.jackson.core:jackson-databind 2.11.3
  • org.apache.commons:commons-compress 1.20
  • com.github.docker-java:docker-java-transport-httpclient5 3.2.7
Tags:
    

Get Connected