HTML to PDF
AI-generatedSummary
Render a provided HTML string into a PDF file with customizable browser and PDF settings, returning the generated PDF as a binary property in the output.
Inputs
- HTML (required) — The HTML string to render into the PDF.
- CSS — Optional CSS to inject into the HTML document before rendering.
- File Name — Name for the generated PDF file.
- Output Binary Property — Binary property name where the generated PDF will be stored.
- Browser Options — Settings for the browser rendering process including executable path, browser channel, timeout, and JavaScript enablement.
- PDF Options — Options controlling PDF format, orientation, scale, margins, headers, footers, media emulation, render delay, and maximum sizes.
- Include Plug Tools Metadata — Whether to include metadata about the PDF generation process in the output JSON.
- Metadata Property — JSON property name to store the generation metadata if included.
Output shape
a single item with a binary property containing the generated PDF file and optionally a JSON property with metadata
The PDF binary is stored under the configured binary property name (default 'data'). The metadata, if included, is stored in a JSON property (default '__plugTools'). Limits on input HTML/CSS size and PDF output size are applied as configured. Errors may occur if limits are exceeded or rendering fails.
Examples
Example 1: Generate a PDF from HTML with default settings
Provide HTML string input; optionally customize file name and output property; receive PDF binary in output.