Skip to content

1.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 07 Aug 04:22
1.0.0

Breaking Changes

  • httpx is no longer installed by default - install the backend you want explicitly:
    • pip install "gotenberg-client[httpx]" - recommended; HTTP/2 and async support
    • pip install "gotenberg-client[niquests]" - HTTP/2 and async support
    • pip install "gotenberg-client[requests]" - sync-only
  • httpx.BasicAuth is no longer accepted for the auth parameter; use a (username, password) tuple instead

Added

  • Pluggable HTTP backend: choose between httpx, niquests, or requests via the backend parameter
    • backend="auto" (default) - uses httpx if installed, falls back to niquests
    • backend="httpx", backend="niquests", backend="requests" - pin a specific backend
  • HttpStatusError - a backend-agnostic exception raised on non-2xx responses, replacing httpx.HTTPStatusError
  • New PDF manipulation options available on Chromium, LibreOffice, Merge, and Split routes:
    • Watermark - apply a watermark behind page content
    • Stamp - apply a stamp on top of page content
    • Rotate - rotate pages by 90°, 180°, or 270°
    • Encrypt - password-protect the output PDF
    • Embed - attach external files inside the PDF container
    • Download-from - instruct Gotenberg to fetch inputs from URLs instead of uploading them
  • Flatten option extended to Chromium conversion routes
  • New Chromium options: wait for a CSS selector, override CSS media features, fail on resource HTTP status codes, skip network idle events, generate tagged (accessible) PDFs
  • New Chromium convenience methods: set header/footer from an in-memory HTML string
  • New LibreOffice options: export placeholder fields, native watermark/tiled watermark, PDF viewer preferences (initial view, zoom, page layout, window controls, etc.)
  • New Merge PDF options: auto-index bookmarks from inputs, set custom bookmarks on the merged output
  • New standalone PDF manipulation routes (operate on existing PDFs):
    • client.watermark.watermark() - watermark existing PDFs
    • client.stamp.stamp() - stamp existing PDFs
    • client.rotate.rotate() - rotate pages of existing PDFs
    • client.encrypt.encrypt() - password-protect existing PDFs
    • client.embed.embed() - embed file attachments into existing PDFs (e.g. ZUGFeRD/Factur-X XML)
    • client.bookmarks.read() - extract the bookmark outline from existing PDFs
    • client.bookmarks.write() - write a bookmark outline into existing PDFs
    • client.version.get() - retrieve the Gotenberg server version

Changed

  • HTTP errors now raise HttpStatusError instead of httpx.HTTPStatusError
    • Migration: replace except httpx.HTTPStatusError with except HttpStatusError (imported from gotenberg_client)
  • File ordering is now preserved when multiple files are submitted in a single request
  • CI testing now runs against Gotenberg 8.29.1

Security

  • GitHub Actions pinned to full commit SHAs to prevent supply-chain attacks via mutable tags

Fixed

  • Compatibility with Gotenberg 8.29's modified read metadata route (see this discussion)