Gotenberg icon

Gotenberg

Convert documents and manipulate PDFs using Gotenberg (Chromium, LibreOffice, PDF Engines)

Chromium → URL to Screenshot

AI-generated

Summary

Take a URL and capture a screenshot or generate a PDF using Chromium.

Inputs

  • url (required) — The URL to convert or screenshot
  • outputBinaryPropertyName — Name of the binary property where the output file will be stored
  • outputFilename — Filename for the output file (including extension)
  • chromiumOptions — Collection of Chromium settings such as width, height, format, margins, scale, etc.

Output shape

a single record containing a binary file and JSON metadata

The binary is placed in the property named by outputBinaryPropertyName; the JSON payload includes filename and mimeType fields. Returns null if conversion fails.

Examples

Example 1: Screenshot a webpage as PNG

url: https://example.com; chromiumOptions: { width: 800, height: 600, format: "png", quality: 90 }; outputBinaryPropertyName: "image"; outputFilename: "capture.png"

Example 2: Convert URL to PDF/A‑2b with PDF/UA enabled

url: https://example.com; chromiumOptions: { pdfa: "PDF/A-2b", pdfua: true }; outputBinaryPropertyName: "pdf"; outputFilename: "report.pdf"

Example 3: Convert uploaded HTML binary to PDF

binaryPropertyName: "htmlContent"; outputBinaryPropertyName: "pdfResult"; outputFilename: "output.pdf"; chromiumOptions defaults

Links

Discussion