A Docker-powered stateless API
for PDF files
Getting started GitHubAvailable on amd64, arm64, armhf, and i386 architectures
- Chromium
- LibreOffice
- PDF Engines
- ...
curl \
--request POST http://localhost:3000/forms/chromium/convert/url \
--form url=https://my.url \
--form landscape=true \
--form marginTop=1 \
--form marginBottom=1 \
-o my.pdf
curl \
--request POST http://localhost:3000/forms/libreoffice/convert \
--form files=@/path/to/file.docx \
--form files=@/path/to/file.xlsx \
--form merge=true \
--form pdfa=PDF/A-1b \
-o my.pdf
curl \
--request POST http://localhost:3000/forms/pdfengines/merge \
--form files=@/path/to/file1.pdf \
--form files=@/path/to/file2.pdf \
--form files=@/path/to/file3.pdf \
--form files=@/path/to/file4.pdf \
-o my.pdf
The API provides many more options and documents to convert 🚀
Learn MoreConvert, merge and more!
Gotenberg provides a developer-friendly API to interact with powerful tools like Chromium and LibreOffice for converting numerous document formats (HTML, Markdown, Word, Excel, etc.) into PDF files, and more!
Thanks to Docker, you don't have to install each tool in your environments; drop the Docker image in your stack, and you're good to go!
Asynchronous workflow
The webhook feature allows you to upload the output file to the destination of your choice.
There are many options to fit your requirements, from the custom HTTP headers sent to your webhook to the HTTP method used to call it.
curl \
--request POST http://localhost:3000/forms/chromium/convert/url \
--header 'Gotenberg-Webhook-Extra-Http-Headers: {"MyHeader": "MyValue"}' \
--header 'Gotenberg-Webhook-Url: https://my.webhook.url' \
--header 'Gotenberg-Webhook-Method: PUT' \
--header 'Gotenberg-Webhook-Error-Url: https://my.webhook.error.url' \
--header 'Gotenberg-Webhook-Error-Method: POST' \
--form url=https://my.url
A modular platform
Gotenberg is a platform composed of modules; each module has properties you may customize to your flavor.
docker run --rm -p 80:80 gotenberg/gotenberg:8 gotenberg --api-port=80 --api-timeout=10s --libreoffice-disable-routes --log-level=debug
🚀 More customizations? Build your own Docker image by adding new tools and create modules that provide new routes to the API.
Go Reference