URL to PDF for marketing

Convert landing pages and reports to PDF

Create PDF versions of public landing pages, campaign reports, articles, and customer pages without maintaining another layout.

  • Landing page conversion
  • Campaign report PDFs
  • Scheduled page archives

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.

Options

Enter a public webpage URL.

PDF document

Set the PDF page size, margins, scale, and print background behavior.

Use px, in, cm, mm, or pt.
Use px, in, cm, mm, or pt.
Scale page content from 0.1 to 2.
Include CSS background colors and images.
Margins

Top, right, bottom, and left. Each value requires a unit.

Apply styles after the page loads and before the PDF is rendered.

Content
Adjust how content is rendered by adjusting these settings.
?

A CSS selector for an element in the HTML. We’ll crop the image to this specific element.


Image size & Cropping
Images are automatically cropped by default. We crop to the outermost HTML element. For extra tweaking, use these settings.
?

Take a screenshot of the entire screen

?

Adjusts the pixel ratio for the screenshot. The default is 2 which is equivalent to a 4K monitor.

?

Set the width of Chrome's viewport. This will disable automatic cropping.

?

Set the height of Chrome's viewport. This will disable automatic cropping.

Set the viewport to landscape orientation.


Timing
By default the API generates a screenshot once everything is loaded. If the page executes JavaScript, you may want extra time before the image is rendered.
?

Adds extra time for JavaScript to execute. Use this if you're seeing a blank image and are using JavaScript.
Default: 0. Start with 500 if needed.

?

Sets a limit on time to wait until the screenshot is taken. Use this if your page loads a lot of extra irrelevant content, and you want to reduce the render time.

?

Check to control when the image is generated.
Call ScreenshotReady() from JavaScript in your code to trigger the image generation.


Browser Context
These settings will impact how Chrome is started, giving you more control when taking screenshots.

Instructs the viewport to behave as if it's being viewed from a mobile device.

Instructs the viewport to behave as if it is being viewed on a device supporting touch events.

?

Set Chrome to render assuming the user has explicitly set their browser to Light or Dark mode.

Set Chrome to render as if it's being set to print or screen mode.

?

Render your image with Chrome set to a specified timezone.

?

Send X-HCTI-SCREENSHOT: 1 with the top-level page navigation

?

Remove the background of the rendered image.

Preview

Your PDF will appear here

Enter a URL, choose the settings you need, and generate the document.

Use cases

Reuse marketing pages as PDF files

Read the PDF docs

Landing page PDFs

Create downloadable versions of published campaign pages for distribution and follow-up.

Campaign reports

Convert browser-based results and dashboards into PDFs for clients and stakeholders.

Content downloads

Turn articles and public resources into PDF downloads without maintaining another design.

Campaign archives

Preserve the final rendered state of public pages for review and historical reference.

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.

PDF generation API

Add PDF generation without running a browser

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