Use Case

Screenshot API for PDF Report Generation

Turn any web page into a clean PDF. Automate report generation from dashboards, invoices, and HTML templates.

The Problem

Generating PDFs from web content is painful

Converting HTML to PDF should be simple, but it never is. Headless browser setups break, print stylesheets are finicky, and pagination is unpredictable. Teams waste days configuring wkhtmltopdf or Puppeteer just to generate an invoice.

  • Self-hosted PDF generation is fragile and hard to maintain
  • Print CSS doesn't work consistently across renderers
  • Dynamic dashboards and charts don't render correctly in PDF
  • Scaling PDF generation under load requires infrastructure work
The Solution

Web page to PDF in one API call

Send a URL or HTML string and get back a perfectly rendered PDF. Works with dynamic content, charts, and complex layouts.

Step 1

Point at your page

Send the URL of a dashboard, invoice, or report page to the PDF endpoint.

Step 2

Configure output

Set page size (A4, Letter), orientation, margins, and header/footer.

Step 3

Download the PDF

Get back a production-ready PDF, rendered in a real browser.

Code Example

Get started in minutes

A single API call is all you need.

curl
curl "https://api.porto.dev/v1/pdf?url=https://your-app.com/invoice/123&format=A4&margin_top=20&margin_bottom=20" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --output invoice.pdf

Try it in the playground

See results instantly with pre-configured defaults for this use case.

Key Features

Built for this use case

Real browser rendering

PDFs are rendered in Chromium, so JavaScript, CSS Grid, and Flexbox all work.

Page size options

A4, Letter, Legal, or custom dimensions for any document type.

Headers & footers

Add page numbers, dates, and custom text to PDF headers and footers.

Custom margins

Control margins precisely for professional document layouts.

Real-World Usage

How teams use screenshot APIs for PDF generation

  • Automated invoice and receipt generation from HTML templates
  • Scheduled PDF exports of analytics dashboards
  • Client-facing reports generated from internal data views
  • Bulk PDF generation for contracts and proposals
Pricing

Starts free. 100 API calls/month.

No credit card required. Scale up as you need with simple, predictable pricing.

Screenshot API for PDF Report Generation | Porto