Buffer, or a ReadStream. For server configuration and limits, see Gotenberg’s Chromium docs.
Converters (to PDF)
| Class | Input | Method |
|---|---|---|
UrlConverter | URL string | convert({ url }) |
HtmlConverter | HTML file (e.g. index.html) | convert({ html }) |
MarkdownConverter | HTML + Markdown files | convert({ html, markdown }) |
convert() returns a Buffer containing the PDF. Pass page properties (size, margins, landscape, etc.) and options like headers, wait conditions, and PDF encryption.
Screenshots (to PNG/JPEG/WebP)
| Class | Input | Method |
|---|---|---|
UrlScreenshot | URL string | capture({ url }) |
HtmlScreenshot | HTML file | capture({ html }) |
MarkdownScreenshot | HTML + Markdown files | capture({ html, markdown }) |
capture() returns a Buffer (image). Set format, quality, dimensions, and similar options via screenshot options.