PDFPipe icon

PDFPipe

Render HTML or URLs to pixel-perfect PDFs using PDFPipe

Render HTML

AI-generated

Summary

Render the required HTML string as a PDF using PDFPipe. Choose page and rendering options, and optionally store the document for later retrieval.

Inputs

  • HTML (required) — HTML content to render; cannot be empty.
  • Format — Paper size: A4 by default, or Letter, A3, A5, Legal, or Tabloid.
  • Landscape — Render in landscape orientation; defaults to false.
  • Print Background — Include background graphics and colors; defaults to true.
  • Margin — Page margin, such as 1cm; defaults to 1cm.
  • Header HTML — Optional running page header. Supports pageNumber, totalPages, date, title, and url substitution classes.
  • Footer HTML — Optional running page footer with the same substitution classes as the header.
  • Tabular Numbers — Use consistent digit widths, useful for aligning numbers in tables; defaults to false.
  • Deduplicate Images — Merge identical image objects in the PDF to reduce file size; defaults to false.
  • PDF/A — Add best-effort PDF/A-1b XMP metadata; defaults to false.
  • Store Document — Store the PDF for later retrieval; defaults to false.
  • Filename — Custom filename when storing the document. Only shown when Store Document is enabled.
  • Password — Optionally password-protect the PDF.
  • Scale — Render scale from 0.1 to 2; defaults to 1.
  • Page Ranges — Pages to keep, such as 1-3, 5; empty keeps all pages.
  • Prefer CSS Page Size — Use the document's CSS @page size and margins instead of the Format and Margin values; defaults to false.
  • CSS Media Type — Emulate print (default) or screen CSS.
  • Inject CSS — Optional extra CSS applied after the page loads.
  • Wait Until — Page readiness condition before rendering: DOM Content Loaded, Load, Network Idle (0 Connections, default), or Network Idle (2 Connections).
  • Wait for Selector — Optional CSS selector to wait for before rendering; the render fails if it does not appear within the timeout.
  • Extra Wait (Ms) — Additional delay before rendering, from 0 to 5000 ms; defaults to 0.
  • Timeout (Ms) — Render timeout from 1000 to 60000 ms; defaults to 30000.

Output shape

One output item per input item, containing a PDF binary or stored-document JSON.

With Store Document disabled (default), the PDF is returned as binary data in the data property, with a JSON filename field (document.pdf unless a filename was supplied). With Store Document enabled, the API's JSON response is returned instead; it may include document ID and URL details.

Links

Discussion