Skip to content

Migrate from Gotenberg

For a Chromium HTML workflow in Gotenberg, keep the populated HTML and replace the API request. If the existing pipeline converts URLs or uses LibreOffice to convert office documents, plan a separate step for fetching HTML or converting those files. This guide covers print-ready HTML and PDF post-processing.

Replace the HTML request

Save the HTML you send to Gotenberg as invoice.html. Put page size and margins in @page and attach every referenced file that the renderer needs.

jq -n --rawfile html invoice.html '{version: 1, html: $html}' |
  curl --fail-with-body http://127.0.0.1:8080/v1/html \
    -H "Authorization: Bearer $PRESSJET_API_KEY" \
    -H 'Content-Type: application/json' \
    --data-binary @- -o invoice.pdf

For multipart uploads, send the JSON as the request field and use each image's src as its attachment name. Binary image example

Recheck what happens after conversion

If your app also merges PDFs, start with the merge API. Check each conversion and post-processing step separately. The repository's five-document lease comparison demonstrates one way to compare page starts and extracted text across both engines.