PDF Api Hub icon

PDF Api Hub

HTML to PDF

Actions36

Screenshot Website to Image → HTML to Image

AI-generated

Summary

Render supplied or sample-based HTML as an image, with optional CSS, Google Fonts, and placeholder values. Choose the image dimensions and output format, then use the returned link, data, or binary in the workflow.

Inputs

  • Ready-Made Sample Name or ID — Select a sample to prefill HTML and dynamic parameters. With no sample selected, provide HTML Content directly; with a sample, edit its loaded HTML if needed.
  • HTML Content — HTML to render. Required when no sample is selected; supports {{placeholder}} substitutions.
  • CSS Content (Optional) — CSS injected after the HTML before rendering.
  • Load Google Fonts — Google Font name or names separated by |. The HTML or CSS must reference the fonts using font-family.
  • Output Format — Choose a hosted URL (default, hosted for 30 days), base64 in JSON, both, or raw PNG binary.
  • Image Width (Px) — Output width in pixels; defaults to 1280.
  • Image Height (Px) — Output height in pixels; defaults to 720.
  • Dynamic Params (From Sample) — Values for placeholders provided by the selected sample.
  • Dynamic Params — Additional placeholder key/value pairs; keys omit the {{ }} braces and values are merged with sample parameters.
  • Advanced Options — Device Scale Factor (default 1, range 1–3) controls pixel density. Quality (default 80, range 30–100) controls image quality and file size.

Output shape

An image result in the selected format: hosted URL, base64 data in JSON, both, or raw PNG binary.

The declared default output format is URL. The source pack does not expose the operation implementation body, so additional response fields and exact response structure are unspecified.

Links

Discussion