Actions20
- Document Management Actions
- PDF to Format Actions
- Format to PDF Actions
- Security & Signing Actions
Format to PDF → HTML to PDF
AI-generatedSummary
Convert HTML content into a PDF document using various input methods and customizable options.
Inputs
- htmlSourceType (required) — Select the source of HTML to convert: webpage URL, raw HTML content, or an HTML file as binary input.
- htmlUrl (required) — Webpage URL to render to PDF; required if Source Type is URL.
- htmlContent (required) — Raw HTML code to convert to PDF; required if Source Type is HTML Content.
- binaryPropertyName (required) — Name of the binary property containing the HTML file; required if Source Type is HTML File (binary).
- pageFormat — Page format of the output PDF (A4, Letter, or Legal).
- landscape — Whether to use landscape orientation for the PDF.
- printBackground — Include background colors and images in the PDF.
- scale — Scale factor for rendering the PDF between 0.1 and 2.
- marginTop — Top margin of the PDF page (e.g., '10mm', '1in').
- marginRight — Right margin of the PDF page.
- marginBottom — Bottom margin of the PDF page.
- marginLeft — Left margin of the PDF page.
- waitUntil — Navigation completion strategy: load, domcontentloaded, networkidle0, or networkidle2.
- timeout — Maximum time in milliseconds to wait for page load (up to 55000 ms).
- waitForSelector — Optional CSS selector to wait for before generating the PDF.
- forceBrowserRendering — Force use of Puppeteer/Chromium rendering instead of wkhtmltopdf.
- outputType — Choose whether output is binary PDF data or a temporary download URL (valid for 1 hour).
- outputBinaryPropertyName — Binary property name to store the PDF when output type is 'Binary Data'.
Output shape
a single record containing the generated PDF file either as binary data or as a JSON with a temporary download URL
The output depends on the 'Output Type' parameter: if 'binary', the PDF content is returned as binary data under the specified binary property name; if 'url', a JSON object is returned with a temporary download URL and file metadata.
Examples
Example 1: Convert a webpage at a URL to PDF with default settings and get a download URL.
Set Source Type to 'URL', provide the webpage URL, keep other PDF options default, and set Output Type to 'URL'. The output will provide a download link to the generated PDF.
Example 2: Convert raw HTML content to a binary PDF with custom margins and landscape orientation.
Set Source Type to 'HTML Content', provide the HTML string, set margins, enable landscape mode, and choose Output Type as 'Binary Data'. The output binary data will contain the PDF file under the specified binary property name.