Letter is a simple Go webserver that allows generation of LaTeX documents. Designed to be run in a Docker container.
Letter accepts input files in a .zip archive. This archive should contain
all resources needed for your document. Letter builds the document with Tectonic
and provides you with the resulting PDF file.
This endpoint builds the PDF synchronously and sends it in the HTTP response. Expects multipart form request with the following fields:
file- the.tararchive containing all input files and resourcesentrypoint- name of.texfile which will be passed to LuaLaTeX
On success, Letter returns the generated PDF file. When an error happens,
Letter returns JSON response containing error (error description)
and tectonic_output (Tectonic log).
This endpoint builds the PDF in the background and sends it in callback request. Expects the same fields as the synchronous API, plus:
callback- URL to which will Letter send the resulting PDF
The callback URL will receive a POST request from Letter with multipart data:
file- the resulting PDFtectonic_output- Tectonic logerror- error description (if available)
Letter can be configured to require authentication. We expect X-Token header
to contain a authentication token equal to the value of AUTH_TOKEN environment
variable.
If AUTH_TOKEN environment variable is not set, Letter will not require authentication.
A Dockerfile is provided that builds and runs Letter. Letter runs on port 8080 by default,
this can be changed using PORT environment variable.
- GoLang 1.21 (or newer)
- Tectonic
