SnapForge PDF
snapforge_pdfGenerate a PDF from a URL or HTML. Configure margins, orientation, page size, and wait conditions. Returns the PDF file path.
Instructions
Render a public URL or raw HTML to a PDF. The PDF is written to a temp file and its path is returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public http/https URL to render. Provide either url or html. | |
| html | No | Raw HTML to render instead of a URL (max 2MB). Provide either url or html. | |
| delay | No | Extra wait in milliseconds before capture (0–10000) | |
| margin | No | CSS size applied to all margins, e.g. "1cm" | |
| landscape | No | Landscape orientation (default false) | |
| waitUntil | No | When to consider the page ready: "load" (default) or "networkidle" | |
| pageFormat | No | Paper size when paginating (default A4) | |
| singlePage | No | Output one continuous page sized to the content height (no A4 pagination) | |
| printBackground | No | Include CSS background colors and images (default true) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bytes | Yes | Size of the PDF in bytes | |
| savedPath | Yes | Absolute path to the saved PDF file |