Everything the Chrome extension does, available as a REST API. Send a URL or raw HTML, get back a professionally styled PDF with content extraction, template selection, and all the same site-specific parsing. Integrate PDF generation into your applications, scripts, and CI/CD pipelines without any browser automation or headless Chrome overhead.
API access on Pro+ ($12/mo). Full docs at api.prettypdfprinter.com/docs.
Three endpoints cover the full PDF generation workflow. Send HTML you control, point at a URL for server-side fetch, or query your document library programmatically.
Send HTML plus options in the request body. You control the input HTML — fetch it yourself, generate it from a template engine, or capture it from a browser. The server applies content extraction, wraps it in your chosen template, and returns the PDF binary. Use this endpoint when you already have the HTML or need full control over the input.
Send a URL in the request body. The server fetches the page, applies site-specific parsing and content extraction, selects your template, and returns the finished PDF. This is the simplest integration path — one HTTP call with a URL, one PDF back. Ideal for automation scripts and scheduled jobs where you do not need to preprocess the page.
List your generated documents and access your PDF library via API. Filter results by date range, search by content, and paginate through your history. Each document record includes metadata — title, source URL, template used, page count, and file size. Use this endpoint to build dashboards, audit trails, or integrate PDF retrieval into your own application.
API access is secured with API keys and governed by per-tier rate limits. Every request must be authenticated, and every tier has clearly defined throughput boundaries.
Authenticate every request by including your API key in the X-API-Key header. Generate keys from the Pretty PDF dashboard under Settings. Each key is scoped to your account and can be revoked individually without affecting your other keys. You can create multiple keys — one per application, environment, or team member — to track usage separately and limit blast radius if a key is compromised.
Rate limits are applied per minute on a rolling window. When you exceed your limit, the API returns an HTTP 429 (Too Many Requests) response with a Retry-After header indicating how many seconds to wait before your next request. Monthly PDF quotas are tracked separately and reset on your billing cycle date.
Implement exponential backoff in your client code to handle 429 responses gracefully. Queue requests when approaching the per-minute limit rather than sending bursts that will be rejected.
Control template selection, page size, content extraction mode, and image handling through request parameters. Every option has a sensible default so you can start with a simple request and add parameters as needed.
| Parameter | Type | Default | Description |
|---|---|---|---|
template |
string | clean | PDF template to apply. Options: clean, minimal, corporate, academic, dark. Each template uses different typography, spacing, and color schemes optimized for its use case. |
page_size |
string | A4 | Output page dimensions. Options: A4 (210 x 297 mm), Letter (8.5 x 11 in), Legal (8.5 x 14 in). Affects layout, margins, and content reflow. |
capture_mode |
string | article | Content extraction mode. article: extract main content and remove clutter. full: keep the complete page. selection: render only the HTML fragment provided, no extraction. |
site_type |
string | auto | Site-specific parser to use. Auto-detected from the URL when not specified. Explicit values: github, stackoverflow, medium, devto, substack, notion, reddit, confluence. |
include_images |
boolean | true | Whether to include images in the PDF output. Set to false to generate a text-only document, reducing file size and generation time for image-heavy pages. |
The API fits anywhere you need to turn a URL or HTML into a PDF without opening a browser. Here are four patterns that developers use most.
Generate weekly or monthly PDF reports from dashboards and data views. Point the API at your reporting dashboard URL on a cron schedule, and the server fetches, extracts, and renders the content into a styled PDF. Attach the result to an email, upload it to Slack, or archive it in S3 — all without spinning up a headless browser.
Convert documentation pages to PDF on every deploy. Add a step to your GitHub Actions or GitLab CI pipeline that calls the API for each documentation URL and commits the generated PDFs to your release artifacts. Keep offline-readable copies of your docs in sync with every release without maintaining a separate PDF toolchain.
Scheduled crawl and PDF generation for compliance and records retention. Feed a list of URLs to the API on a recurring schedule to produce timestamped PDF snapshots. Useful for regulatory compliance, legal evidence preservation, and organizational knowledge management where you need to prove what a page looked like at a specific point in time.
Capture page states on test failure for QA reports. When an end-to-end test fails, call the API with the page HTML or URL to generate a PDF snapshot of the failing state. Attach the PDF to your test report for visual context that persists after the test environment is torn down. No screenshots to manage — the PDF preserves full text, links, and layout.
One HTTP call. One styled PDF. No browser automation, no headless Chrome, no maintenance overhead.
Get your API key