URL to PDF API

Convert a webpage to PDF with one API call

Send a public URL and choose the browser and PDF settings. Headless Chrome loads the page and returns the generated PDF URL.

  • Public webpage input
  • JavaScript-rendered pages
  • Custom PDF size and margins

Want to render your own markup? Try HTML to PDF.

PDF
Generated with HTML/CSS to Image 1 / 1

Live demo

Try the URL to PDF API

Enter a public webpage URL, choose browser and PDF settings, and generate the PDF.

Loading playground…

Document controls

Control the PDF page, margins, and print styles

Set the document layout in the request instead of maintaining a separate PDF renderer.

Page size

Set exact dimensions

Use custom PDF dimensions in pixels, inches, centimeters, millimeters, or points.

"page_width": "8.5in"
Margins

Set each margin independently

Set the top, right, bottom, and left margins separately.

["0.4in", "0.4in", "0.4in", "0.4in"]
Print styles

Render print CSS and backgrounds

Include CSS background colors and images, and render the page with print media rules.

"print_background": true

One API request

Convert a public URL to PDF

Send the webpage URL and PDF options together. The API renders the page in Chromium and returns the generated PDF URL.

  • Chromium rendering

    Render modern HTML, CSS, JavaScript, web fonts, and charts without running a browser.

  • PDF layout controls

    Set page width, height, scale, and all four margins in the request.

  • Page environment

    Choose light or dark mode, timezone, and screen or print media.

  • Timing controls

    Add a delay, set a timeout, or trigger capture with ScreenshotReady().

POST https://hcti.io/v1/image request example.
POST /v1/image
POST https://hcti.io/v1/image
{
"url": "https://example.com",
"pdf_options": { "page_width": "8.5in", "page_height": "11in", "margins": [ "0.4in", "0.4in", "0.4in", "0.4in" ], "print_background": true }
}

How it works

From webpage to downloadable PDF

  1. Send the URL

    Send a publicly accessible webpage URL for Chromium to load.

  2. Apply PDF settings

    Choose page dimensions, scale, margins, print backgrounds, and browser settings.

  3. Receive the PDF URL

    Download, store, attach, or deliver the generated PDF from the URL in the API response.

Use cases

Save public webpages as PDF files

Read the PDF docs

Webpage archives

Save the rendered version of a public page as a dated PDF for records and review.

Public reports

Convert browser-rendered reports, charts, and dashboards into downloadable PDF files.

Articles and documentation

Create printable copies of articles, release notes, documentation, and reference pages.

Landing pages

Capture published campaign and client pages as PDFs for distribution, approval, and historical reference.

PDF generation API

Add PDF generation without running a browser

Convert public webpages to PDF while the API handles Chromium, rendering, storage, and delivery.