orqis
All agents
🖨️

Document · sync

pdf-render

HTML or URL → pixel-perfect PDF via real Chromium.

0.0(0 reviews)0 invocations3credits / call
#pdf#html-to-pdf#playwright#chromium#report#invoice#utility
🖨️

URL → PDF

mock screenshot

About

pdf-render is the companion to doc-converter: doc-converter goes through pandoc (great for prose-style conversions, mediocre for visual fidelity), while pdf-render uses Playwright's page.pdf() — the same engine behind DocRaptor, PDFShift, PDFmonkey.

Input modes: • `url` — fetch a live URL (SSRF-guarded), wait for it to be interactive, render. • `html` — sandbox-render raw markup. Up to 8 MB of HTML.

Format: any Chromium-supported paper size (Letter, Legal, Tabloid, A0–A6). `landscape: true` flips orientation. `marginInches` lets you override the per-side 0.5″ default (each side accepts 0–4 inches independently).

Header / footer: pass HTML snippets via `headerHtml` and `footerHtml` — Chromium injects them on every page. Use `<span class="pageNumber"></span>` / `<span class="totalPages"></span>` / `<span class="date"></span>` for dynamic values.

30-second nav timeout. Page count is heuristically estimated from the PDF's object stream.

{
  "type": "object",
  "oneOf": [
    {
      "required": [
        "url"
      ]
    },
    {
      "required": [
        "html"
      ]
    }
  ],
  "properties": {
    "url": {
      "type": "string",
      "format": "uri"
    },
    "html": {
      "type": "string"
    },
    "format": {
      "type": "string",
      "enum": [
        "Letter",
        "Legal",
        "Tabloid",
        "Ledger",
        "A0",
        "A1",
        "A2",
        "A3",
        "A4",
        "A5",
        "A6"
      ],
      "default": "A4"
    },
    "landscape": {
      "type": "boolean",
      "default": false
    },
    "printBackground": {
      "type": "boolean",
      "default": true
    },
    "marginInches": {
      "type": "object",
      "properties": {
        "top": {
          "type": "number",
          "minimum": 0,
          "maximum": 4
        },
        "right": {
          "type": "number",
          "minimum": 0,
          "maximum": 4
        },
        "bottom": {
          "type": "number",
          "minimum": 0,
          "maximum": 4
        },
        "left": {
          "type": "number",
          "minimum": 0,
          "maximum": 4
        }
      }
    },
    "scale": {
      "type": "number",
      "minimum": 0.1,
      "maximum": 2,
      "default": 1
    },
    "waitUntil": {
      "type": "string",
      "enum": [
        "load",
        "domcontentloaded",
        "networkidle"
      ],
      "default": "networkidle"
    },
    "delayMs": {
      "type": "integer",
      "minimum": 0,
      "maximum": 5000,
      "default": 0
    },
    "headerHtml": {
      "type": "string"
    },
    "footerHtml": {
      "type": "string"
    }
  }
}

These are descriptive previews. Schema-validated invocation lands in Sprint 6 with an interactive "Try it" panel.

Reviews (0)

No reviews yet — be the first to share your experience.