Use Case

PDF generation for web developers & QA teams

QA teams need evidence. When a bug is filed, you need a snapshot of exactly what the page looked like. When a regression is caught, you need before-and-after proof. Pretty PDF captures page states as professional PDFs — and the API lets you automate it in your CI/CD pipeline.

API access on Pro+ ($12/mo). Free tier: 3 PDFs/month.

QA workflows

QA testing use cases

Capture webpage states as reliable PDF evidence for every stage of your testing workflow.

Bug evidence

Capture the exact page state when filing bug reports. The PDF includes the URL, timestamp, and full page content — a permanent record of what the reporter saw, not a lossy screenshot that loses text selection and accessibility.

Visual regression snapshots

Automate PDF generation before and after deployments to create comparison artifacts. When a visual regression is detected, the before-and-after PDFs provide clear evidence of what changed and when it changed.

Test reports

Generate PDF reports from test result dashboards for stakeholder review. Convert CI/CD dashboards, coverage reports, and test summaries into shareable documents that non-technical stakeholders can read without needing access to your tooling.

Compliance screenshots

Regulatory requirements often demand documented UI states. PDFs are more reliable than screenshots — they are searchable, timestamped, and preserve text fidelity. Meet SOC 2, HIPAA, and GDPR documentation requirements with archival-quality PDF evidence.

Cross-browser documentation

Capture page rendering evidence across different environments. Document how your application appears in Chrome, Firefox, and Safari by generating PDFs from each browser's rendered output, creating a permanent cross-browser compatibility record.

API integration for automated PDF generation

The Pretty PDF API provides two endpoints for programmatic PDF generation: POST /v1/generate accepts raw HTML content, and POST /v1/generate/url accepts a URL and fetches the page server-side. Both return a professionally formatted PDF with your chosen template applied.

Authentication uses an API key passed via the X-API-Key header. API access is available on Pro+ plans, which include 200 API requests per month. Rate limits are applied per-minute and communicated via response headers so your automation can implement backoff logic.

The API integrates naturally into CI/CD pipelines and automated workflows:

  • GitHub Actions step that captures production pages after each deployment, storing the PDFs as workflow artifacts for the team to review.
  • Cron job that archives staging environment pages nightly, creating a dated record of application state for regression tracking.
  • Test framework hook that captures the page state on test failure, attaching the PDF to the test report so developers can see exactly what the page looked like when the assertion failed.
  • Batch processing across multiple pages — loop through a list of critical URLs and generate PDFs for each, building a complete snapshot of your application at any point in time.

Here is an example using curl to capture a page as a PDF test artifact:

curl -X POST https://api.prettypdfprinter.com/v1/generate/url \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://staging.yourapp.com/dashboard",
    "template": "clean",
    "page_size": "A4"
  }' \
  --output "test-artifacts/dashboard-$(date +%Y%m%d).pdf"

The API returns the PDF binary directly in the response body. Store it as a build artifact, attach it to a Jira ticket, or commit it to a test evidence repository. Every PDF includes the source URL and generation timestamp in its metadata.

Developer tools

Developer workflow

From manual capture during development to fully automated PDF generation in production.

Extension for manual capture

One-click PDF from any page during development. Browse to localhost, staging, or production, click the extension icon, and get a clean PDF instantly. No configuration, no setup, no command-line required.

API for automation

REST endpoints for programmatic PDF generation. POST a URL or raw HTML and receive a formatted PDF. Integrate into scripts, pipelines, webhooks, and internal tooling with any language that makes HTTP requests.

Dark Mode template

Ideal for developer docs and code-heavy content. The Dark Mode template provides a dark background with high-contrast syntax coloring, mirroring the environment developers work in. Perfect for API documentation, code reviews, and technical specifications.

Code block formatting

Monospace fonts (JetBrains Mono embedded), syntax-aware styling, and proper line wrapping. Code blocks in the PDF look as good as they do in your IDE. Long lines wrap cleanly instead of being clipped at the page margin.

Getting started

Integrate the API in four steps

From API key to test artifact in minutes.

1

Get your API key

Sign up for a Pro+ plan and generate an API key from your dashboard. The key authenticates all API requests via the X-API-Key header.

2

POST a URL or HTML

Send a POST request to /v1/generate/url with a URL, or to /v1/generate with raw HTML. Include your preferred template and page size in the request body.

3

Receive your PDF

The API returns the PDF binary in the response body. Professional formatting is applied automatically — content extraction, template styling, and embedded fonts are all handled server-side.

4

Store as test artifact

Save the PDF as a CI/CD build artifact, attach it to a bug ticket, or commit it to your test evidence repository. Each PDF includes source URL and timestamp metadata.

Frequently asked questions

Yes. The Pretty PDF API accepts URLs or raw HTML via POST requests and returns formatted PDFs. You can integrate it into GitHub Actions, GitLab CI, Jenkins, or any pipeline that can make HTTP requests. A typical workflow posts the production URL after deployment and stores the returned PDF as a build artifact for later review or comparison.
API rate limits are applied per-minute based on your plan tier. Pro+ plans include 200 API requests per month. Rate limit headers are returned with every response so you can implement backoff logic in your automation scripts. For batch processing, space requests at least one second apart to stay within limits.
When using the Chrome extension, yes — the extension captures the fully rendered DOM including JavaScript-generated content, because it runs in the browser after all scripts have executed. When using the API with a URL, the server fetches the raw HTML without executing JavaScript, so heavily JS-dependent pages may have reduced fidelity. For best results with SPAs or JS-rendered content, use the extension or send the rendered HTML directly via the API.
With the Chrome extension, yes — you can generate a PDF from any page you can view in your browser, including localhost, staging environments, and internal tools behind VPN. The extension captures the page content client-side and sends the HTML to the API for PDF generation. The URL-based API endpoint requires the URL to be publicly accessible, so for internal URLs, use the extension or send the HTML directly.
Any language that can make HTTP requests. The API is a standard REST endpoint — POST JSON, receive a PDF. Python (requests), JavaScript (fetch/axios), Go (net/http), Ruby (Net::HTTP), Java (HttpClient), Rust (reqwest), and shell scripts (curl) all work. Authentication is via an X-API-Key header, and the response body is the PDF binary.

Automate PDF generation for your team

API access on Pro+ plans. Free tier includes 3 PDFs per month with all templates.

Automate PDF Generation for Your Team