Screenshot PDF
POST
/v1/screenshot/pdf
curl -X POST "https://screenshot.toolkitapi.io/v1/screenshot/pdf" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "page_format": "A4", "landscape": false}'
# See curl example
// See curl example
# See curl example
Response
200 OK
{
"pdf": "JVBERi0xLjQKMSAwIG9i...",
"url": "https://example.com",
"page_format": "A4",
"landscape": false
}
How to Use
1
Send a POST request to /v1/screenshot/pdf with a JSON body containing the target url.
2
Set page_format to choose paper size (A4, Letter, Legal, Tabloid), landscape for orientation, and print_background to include background styles.
3
The response returns a base64-encoded PDF document.
About This Tool
Render a webpage as a multi-page PDF document using headless Chromium's print-to-PDF functionality. The entire page content is captured regardless of viewport height.
Supports standard paper sizes (A4, Letter, Legal, Tabloid), landscape orientation, and optional background colour/image rendering. Ideal for generating printable reports from web content.
Why Use This Tool
- Report Generation — Convert dashboards, invoices, or documentation pages into downloadable PDFs without a client-side library.
- Web-to-Print — Render marketing pages, portfolios, or proposals as print-ready PDFs.
- Content Export — Let users export blog posts, articles, or help docs as offline PDFs.
Frequently Asked Questions
What paper sizes are supported?
A4, Letter, Legal, and Tabloid.
Are background images included?
Yes by default. Set print_background to false to exclude them (useful for ink-saving prints).
Can I control viewport width?
Yes — the width parameter controls the viewport width used during rendering, which affects responsive layouts before PDF generation.
Start using Screenshot PDF now
Get your free API key and make your first request in under a minute.