Skip to content

Product

PDF Generation API

Turn any URL into a print-ready PDF with one API call. Control paper format, orientation, margins, and background graphics — rendered by a real Chrome browser, not a templating library.

3
Paper formats
80+
Countries
1 flag
To enable PDF

API request

POST /screenshots
Authorization: X-API-KEY <key>

{
  "url": "https://example.com/report",
  "pdf": true,
  "pdf_format": "a4",
  "pdf_landscape": false,
  "pdf_background": true,
  "pdf_margin": "20mm",
  "pdf_margin_bottom": "15mm"
}

Returns a signed PDF URL in the response · Deliver directly to S3, Drive, or Dropbox

Capabilities

Everything you need from a PDF API

One consistent parameter set controls the full output pipeline — from page rendering to file delivery. No PDF library configuration, no headless browser maintenance.

📄

Full-page PDF rendering

Render entire scrolling pages — not just the visible viewport — into a single continuous PDF. Fonts, images, and layout are captured exactly as Chrome renders them.

📐

Paper format & orientation

Choose from A4, Letter, or Legal paper sizes and switch between portrait and landscape. Outputs match print-ready dimensions.

Margin control

Set custom top, right, bottom, and left margins with any CSS unit (px, mm, in, cm). Use pdf_margin as a shorthand for all sides, or override individual sides independently.

🎨

CSS background rendering

Preserve background colours and images in the PDF output. Headless Chrome omits backgrounds by default; one flag re-enables them for brand-accurate renders.

🌍

Country & region routing

Route your PDF job to a browser in a specific country. Geo-gated content, localised pricing, and region-aware copy are all rendered faithfully.

🔐

Authenticated page capture

Inject session cookies or run multi-step login flows before the PDF is generated. Capture dashboards, reports, and portals that live behind a login.

Automation steps

Click, scroll, type, wait, and navigate before the PDF is captured. Dismiss cookie banners, expand collapsed sections, or fill in a date picker first.

☁️

Direct cloud delivery

Push each PDF directly to Amazon S3, Google Drive, Dropbox, OneDrive, Box, or FTP. No extra transfer step needed between the API and your storage layer.

Live examples

PDFs captured with the API

Each PDF below was generated with a single API call using different parameter combinations. Replace the placeholders with real output once samples are ready.

Letter — fit to one page

Full-page render scaled to fit a single Letter sheet.

"pdf": true,
"pdf_format": "letter",
"pdf_margin": 0,
"pdf_landscape": false,
"pdf_one_page": true

A4 landscape — custom margins

Wide-format export with uniform margin and reduced bottom spacing.

"pdf": true,
"pdf_format": "a4",
"pdf_margin": "25px",
"pdf_margin_bottom": "15px",
"pdf_landscape": true

API parameters

PDF-specific parameters

These parameters extend the standard screenshot request. All other parameters — url, country, steps, cookies, etc. — work as normal.

Parameter Type Default Description
pdf boolean false Set to true to request PDF output instead of an image.
pdf_format string letter Paper size — a4, letter, legal.
pdf_landscape boolean false Rotate the output to landscape orientation.
pdf_one_page boolean false Scale the rendered page to fit on a single PDF page.
pdf_background boolean false Include CSS background colours and images in the output.
pdf_margin string 0 Default margin for all four sides — any CSS unit: px, mm, in, cm.
pdf_margin_top string 0 Top margin — any CSS unit: px, mm, in, cm. Overrides pdf_margin.
pdf_margin_right string 0 Right margin — any CSS unit. Overrides pdf_margin.
pdf_margin_bottom string 0 Bottom margin — any CSS unit. Overrides pdf_margin.
pdf_margin_left string 0 Left margin — any CSS unit. Overrides pdf_margin.

Full parameter reference in the API docs.

Use cases

What teams build with the PDF API

Automated report generation

Render HTML dashboards into PDF every night and push them to S3 or Google Drive. Replace brittle PDF libraries with browser-accurate output and a predictable API.

Invoices & receipts

Turn an HTML invoice template into a PDF in a single API call. Fonts, logos, and table layouts stay pixel-perfect regardless of user locale or server environment.

Regulatory & compliance archival

Snapshot live web pages as legally defensible PDFs with a precise timestamp. Useful for terms-of-service versions, regulatory filings, and content audits.

Print-ready content delivery

Convert marketing landing pages, data sheets, and brochures into downloadable PDFs on demand — always reflecting the current live version of the page.

Visual testing evidence

Attach a PDF render alongside each CI deployment to record exactly how the UI looked at the moment of the release. Diffs between PDF versions are easy to review.

Client deliverables

Generate polished PDF exports for clients — analytics summaries, SEO reports, or brand audits — straight from a live web view without an intermediate design tool.

How it works

From URL to PDF in three steps

1

Submit the request

POST your URL with pdf=true and any paper, margin, or automation options. The job is queued immediately.

2

Browser renders the page

A real Chrome instance loads the URL, runs any automation steps, and exports the page to PDF using the Puppeteer print pipeline.

3

Retrieve or forward the file

Poll for completion, then download from the signed URL — or configure an app integration to push the PDF directly to your storage platform.

Integrations

Deliver PDFs straight to your storage

Connect ScreenshotCenter to your cloud storage once and every PDF job lands there automatically — no extra upload code needed.

  • Amazon S3 & S3-compatible storage
  • Google Drive
  • Dropbox
  • Microsoft OneDrive & SharePoint
  • Box
  • FTP / SFTP
  • Webhook (POST to any endpoint)
Browse all integrations →

Example: S3 delivery

{
  "url": "https://example.com/invoice/42",
  "pdf": true,
  "pdf_format": "Letter",
  "pdf_print_background": true,
  "app": "s3",
  "app_options": {
    "bucket": "my-invoices",
    "key": "invoices/2026/042.pdf"
  }
}

FAQ

Frequently asked questions

How do I request a PDF instead of a screenshot?

Add pdf=true to any screenshot request. The response will include a PDF artifact URL alongside the standard fields.

Which paper formats are supported?

a4, letter, and legal. Set the format with the pdf_format parameter.

Can I render PDFs in landscape orientation?

Yes. Pass pdf_landscape=true to flip the output. Combine with any paper format.

Are CSS backgrounds included in the PDF?

By default Chrome omits background graphics in print mode. Set pdf_background=true to preserve background colours and images.

Can I set custom page margins?

Yes. Use pdf_margin to set all four sides at once, or pdf_margin_top, pdf_margin_right, pdf_margin_bottom, and pdf_margin_left to override individual sides. Values accept any CSS unit (e.g. 20px, 1.5mm, 0.5in).

Does PDF generation work with pages behind a login?

Yes. Inject session cookies or use automation steps (click, type, navigate) to authenticate before the PDF capture runs.

Can I route the PDF job to a specific country?

Yes. Add a country parameter to render geo-gated content or localised pages from a specific geographic location.

How is the PDF delivered?

The API returns a signed URL where the PDF is hosted. You can also configure an app integration (S3, Google Drive, Dropbox, etc.) for direct cloud delivery.

Start generating PDFs today

Free trial includes 500 captures — no credit card required. Add PDF output to any capture request with a single parameter.