Skip to main content
For the complete documentation index for agents and LLMs, see llms.txt.

GotenbergFileConverter

Route local files, typed byte streams, and HTTP(S) URLs to Gotenberg and return ordered PDF ByteStream objects. Gotenberg handles LibreOffice, Chromium HTML, Chromium Markdown, and URL-to-PDF conversion; this component picks the route from each source.

Key Features​

  • Converts Office documents and many other local file types through Gotenberg's LibreOffice route.
  • Converts HTML, Markdown, and web URLs through Gotenberg's Chromium routes.
  • Accepts file paths, Path objects, ByteStream inputs, and URL strings in one batch.
  • Supports synchronous and asynchronous execution with a configurable async concurrency limit.
  • Optional resources for HTML and Markdown conversion (CSS, images, and similar assets).

Configuration​

  1. Run a Gotenberg instance reachable from your pipeline (for example http://localhost:3000). See the Gotenberg documentation.
  2. Add GotenbergFileConverter to your pipeline and set url to your Gotenberg base URL.
  3. Connect the pipeline file input to sources and wire output to a downstream converter such as PyPDFToDocument if you need Haystack Document objects.

Connections​

GotenbergFileConverter accepts sources (and optional resources at run time) and returns output, a list of PDF ByteStream objects in input order. Connect output to document converters or file writers downstream.

Source Code​

To check this component's source code, open converter.py in the Haystack Core Integrations repository.

Usage Examples​

Basic Configuration​

gotenberg_converter:
type: haystack_integrations.components.converters.gotenberg.converter.GotenbergFileConverter
init_parameters:
url: http://localhost:3000
timeout: 30.0
concurrency_limit: 5

Using the Component in a Pipeline​

# haystack-pipeline
components:
gotenberg_converter:
type: haystack_integrations.components.converters.gotenberg.converter.GotenbergFileConverter
init_parameters:
url: http://localhost:3000
pdf_converter:
type: haystack.components.converters.pypdf.PyPDFToDocument
init_parameters: {}

connections:
- sender: gotenberg_converter.output
receiver: pdf_converter.sources

inputs:
files:
- gotenberg_converter.sources

max_runs_per_component: 100

metadata: {}

Parameters​

Init Parameters​

ParameterTypeDefaultDescription
urlstrhttp://localhost:3000Base URL of the Gotenberg service (HTTP or HTTPS).
timeoutfloat30.0Request timeout in seconds.
concurrency_limitint5Maximum concurrent Gotenberg requests during run_async. Synchronous run converts one source at a time.