ScreenshotNeo

BlogComparisons

Best Screenshot API for Generating PDFs from Web Pages

Compare APIs that turn web pages into PDFs, understand print versus full-page output, and choose with a representative-page test.

By the ScreenshotNeo team4 October 202610 min read

Short answer: Start with ScreenshotNeo if you want a screenshot API that also returns PDFs, clean captures, and clear billing verdicts. For document-focused workflows, shortlist Browserless, ScreenshotOne, and Urlbox too, then test them against the same pages and settings. There is no evidence here for a universal performance or reliability winner.

First decide what “PDF” should mean for your workflow. A print-generated PDF is a paginated document, often with selectable text. A full-page capture may instead put a long page on one oversized sheet, preserving its continuous visual layout. These outputs suit different needs.

1. Shortlist: APIs to evaluate

API Documented PDF capability Good reason to evaluate Check before choosing
ScreenshotNeo Returns PDFs as well as PNG, JPEG, and WebP screenshots. Supports paper size, margins, landscape, and page ranges. Useful when clean captures, explicit per-response billing verdicts, or screenshot and PDF workflows on one API matter. Test your print styles, page breaks, authentication, expected volume, and required operational terms.
Browserless PDF API Dedicated /pdf REST endpoint accepts a URL or raw HTML. Its PDF uses Chrome’s print engine and produces selectable text. PDF controls include paper format, backgrounds, orientation, page ranges, and headers or footers. Consider it when you want separate documented PDF and screenshot endpoints with print controls. Confirm current plan cost, throughput and concurrency, geography, authentication, support terms, and behavior on your pages. See also the Screenshot API and PDF API reference.
ScreenshotOne PDF API Advertises PDF generation from URLs, HTML, or Markdown. Documented settings include screen media, printing backgrounds, and an option to try fitting a page onto one sheet. Evaluate it if input flexibility or a one-call PDF workflow matters. Verify current output options, usage tiers, integration constraints, and rendering on representative pages. See its screenshot options.
Urlbox PDF API Documents PDF as a render format and a full-page mode that attempts to put the whole website on a single PDF page. Consider it if one provider for multiple render formats or continuous one-page output suits the workflow. Check current pricing and render allowances, plus layout and operational requirements. See render options.

This is a feature-based shortlist, not a quality ranking. The cited vendor materials document capabilities; they do not provide comparable independent benchmarks or complete current prices for all providers. ScreenshotNeo is listed first because it combines clean captures, billing only for clean shots, and paid plans starting at $5 for 3,000 screenshots.

2. Choose the right kind of PDF

Paginated print output

Choose ordinary print-to-PDF behavior for reports, invoices, and documents people will read or print as pages. Page size, margins, orientation, print CSS, and page breaks affect the result. Browserless states that its PDF endpoint uses Chrome’s print engine and creates real selectable text rather than a screenshot. That is useful when users need to search, select, or parse text, but confirm the output for your own content.

One-sheet full-page output

Choose a single tall sheet when the goal is a continuous visual record of a web page. Urlbox documents a full-page PDF mode that attempts this; ScreenshotOne documents an option to try to fit the page onto one sheet. These are layout goals rather than ordinary paginated paper output. Check readability and output dimensions for very long pages.

Questions to settle first

  • Do downstream users need selectable text, or is visual fidelity enough?
  • Should the PDF follow print styles or screen styles?
  • Should backgrounds and background images print?
  • Should content span pages, or fit on one oversized sheet?
  • Do you need URL, HTML, or Markdown input?
  • Does the page require cookies, authorization, custom headers, or a particular locale?

3. Compare providers with a repeatable test

  1. Build a representative set. Include a short article, long report, invoice, page with web fonts and images, lazy-loaded content, and any authenticated page you need to render.
  2. Define expected output. Record the target page dimensions, paper size, margins, page count, whether text must be selectable, and whether print or screen styling is intended.
  3. Match settings. Use equivalent viewport or media settings, background handling, waits, and page ranges where each API supports them. Record differences instead of assuming similarly named settings behave identically.
  4. Inspect the PDFs. Check clipping, blank pages, headers and footers, page breaks, font substitution, image loading, selectable text, and output size. For one-sheet mode, check whether the final document is readable at practical zoom.
  5. Exercise failures. Test redirects, slow resources, blocked pages, invalid URLs, and authentication expiry. Record response status, error details, timeout behavior, and whether retries are safe.
  6. Estimate operating cost. Use your expected monthly successful volume and the vendor’s current pricing and accounting rules. Include retries, concurrency limits, storage or delivery needs, and support requirements.
  7. Repeat before committing. Re-run the set after changing a template or provider configuration. Rendering can change when page content, browser behavior, or fonts change.

Do not infer a speed or reliability winner from feature documentation. Compare the same pages under equivalent conditions and verify current pricing, concurrency, geography, authentication, and support terms directly with each provider.

4. Generate a PDF yourself with browser automation

If you already run a browser worker, a browser’s print-to-PDF function gives you direct control over navigation and print settings. The following runnable Node.js example uses Playwright. Install Playwright and its Chromium browser first with npm install playwright and npx playwright install chromium.

const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch({ headless: true });
  try {
    const page = await browser.newPage({
      viewport: { width: 1440, height: 1000 },
    });
    await page.goto('https://example.com', {
      waitUntil: 'networkidle',
      timeout: 60000,
    });
    await page.pdf({
      path: 'page.pdf',
      format: 'A4',
      printBackground: true,
      margin: { top: '12mm', right: '12mm', bottom: '12mm', left: '12mm' },
      preferCSSPageSize: true,
    });
  } finally {
    await browser.close();
  }
})();

This is a print-generated, paginated PDF. For pages with delayed content, wait for a page-specific selector or application-ready signal rather than relying on a fixed delay. networkidle can take a long time or never occur on pages with ongoing network activity.

Browser setup considerations

  • Print styles: Pages can define print-specific CSS, including page size and breaks. preferCSSPageSize lets CSS page size take precedence where supported by the browser library.
  • Backgrounds: Enable background printing if colors or images are part of the intended document.
  • Authentication: Set cookies or headers in the browser context before navigating. Keep secrets out of logs and generated public files.
  • Readiness: Wait for a meaningful selector, font readiness, or app-specific render completion when important content appears after navigation.
  • Cleanup: Close pages and browsers even after failures. Bound concurrency so each worker does not exhaust memory or CPU.
  • Long pages: Print pagination and single-sheet capture are different workflows. Browser PDF generation is usually document-oriented; test any custom stitching or oversized-sheet approach separately.

5. Call a hosted PDF API

Hosted APIs remove the need to operate a browser fleet, but request formats, output options, authentication, and billing differ. The examples below show how to call ScreenshotNeo’s URL-to-PDF endpoint. Create an API key and consult the ScreenshotNeo API documentation for the current PDF parameter names and accepted values before using these requests.

cURL

curl -G "https://api.screenshotneo.com/v1/shot" \
  -d access_key=YOUR_API_KEY \
  --data-urlencode url=https://stripe.com \
  -o page.pdf

Python

import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={
        "access_key": "YOUR_API_KEY",
        "url": "https://stripe.com",
        "format": "pdf",
    },
    timeout=90,
)
r.raise_for_status()
with open("page.pdf", "wb") as f:
    f.write(r.content)

Node.js

const q = new URLSearchParams({
  access_key: 'YOUR_API_KEY',
  url: 'https://stripe.com',
  format: 'pdf',
});
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`ScreenshotNeo request failed: ${res.status}`);
const bytes = new Uint8Array(await res.arrayBuffer());
await (await import('node:fs/promises')).writeFile('page.pdf', bytes);

Keep API keys in environment variables or a secrets manager in production. URL-encode target URLs, especially when they contain query strings. Check the response status and headers before treating the body as a PDF. ScreenshotNeo supports caching with a chosen TTL, bulk capture for up to 100 URLs per call, async jobs with signed webhooks, and a usage API; consult the docs for request syntax and limits.

6. Render quality, performance, reliability, and cost

Rendering quality

  • Use print media when the intended PDF is a document; use screen media only when preserving the screen layout is required and the provider supports it.
  • Check print CSS, page breaks, margins, backgrounds, fonts, and image loading on the actual pages.
  • For a continuous capture, verify dimensions and readability; a page squeezed onto one sheet may become impractical to read.
  • Test text selection and extraction if search, accessibility, or parsing matters. A PDF endpoint can still produce output whose semantics vary with page content and rendering method.

Performance and reliability

  • Measure end-to-end latency on your own representative pages and volume. The research sources do not establish comparative speed or reliability.
  • Set a timeout appropriate to page complexity. Distinguish a slow page from an API failure, and record status and diagnostic headers.
  • Use bounded concurrency and queue work when generation volume is bursty. Confirm each provider’s current concurrency and rate limits.
  • Retry transient failures with backoff, but avoid endlessly repeating deterministic failures such as invalid URLs or authorization errors.
  • Cache repeat requests when content freshness permits. ScreenshotNeo offers configurable TTL caching.
  • For large batches, consider async jobs and webhooks rather than holding a client connection open. ScreenshotNeo supports async jobs with signed webhooks and bulk capture up to 100 URLs per call.

Cost and billing

Compare current plans against successful output volume, not just the headline request allowance. Confirm how failed loads, retries, cached requests, PDF output, and batch jobs count. Prices and plan terms can change. ScreenshotNeo states that only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, with X-Page-Verdict and X-Billed response headers identifying the result.

ScreenshotNeo’s listed plans are Free with 1,000 shots per month and no card; Starter at $5 for 3,000; Growth at $15 for 15,000; Pro at $39 for 60,000; Scale at $99 for 250,000; and Business at $249 for 1,000,000. Yearly billing gives two months free, and every feature is on every plan. Verify current terms on the product site before purchase.

7. Troubleshooting common PDF problems

Symptom Likely cause What to try
PDF contains a blank or partially rendered page Navigation completed before the app finished rendering, or content depends on delayed requests. Wait for a page-specific ready selector or application signal; increase the timeout for genuinely slow pages; inspect response verdicts and status.
Background colors or images are missing Background printing is disabled, or print CSS removes those elements. Enable print backgrounds where available and inspect the page’s print stylesheet.
Content is clipped at page edges Margins, paper size, fixed-width content, or print CSS do not fit the page. Adjust paper and margins, use responsive print styles, and test a representative long page.
Unexpected blank pages or awkward splits CSS page-break rules or content dimensions interact poorly with the chosen paper size. Inspect print CSS around tables, images, and section breaks; test page ranges and paper settings.
Fonts or images differ from the browser view Resources were not loaded, font requests were blocked, or the PDF uses print-specific styles. Wait for resources, check access to font and image hosts, and compare screen and print media intentionally.
Request times out The target page is slow, network-idle never occurs, or the configured timeout is too short. Use a targeted readiness condition rather than global network idle where appropriate; tune timeout and retry only transient failures.
API returns an error or non-PDF body Invalid key, unsupported option, inaccessible URL, or an error response was saved as a file. Check HTTP status and response headers before writing output; verify key, URL encoding, and documented parameter names.
PDF is too large or one-sheet output is unreadable High-resolution images or a very long page produce excessive dimensions or file size. Reduce unnecessary image content, use pagination for documents, and reserve full-page mode for workflows that can handle its dimensions.
Authenticated page renders as a login screen Cookies or authorization were absent, expired, or scoped to a different host. Provide current authentication using the API’s documented cookie/header controls or establish the browser session before navigation.

8. Or skip the browser setup

ScreenshotNeo returns a PDF or screenshot from one GET request. Its cookie and consent handling accepts banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed. The X-Page-Verdict and X-Billed headers say what happened.

For an image capture, the documented request shape is:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

For PDF output, add the documented PDF format option from the API docs. Python and Node.js clients can send the same GET request with query parameters and save the response bytes.

An MCP server gives AI agents such as Claude, Cursor, or any MCP client the tools take_screenshot, get_page_info, and capture_pdf. Plans start with 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000, and every feature is on every plan. Create a free ScreenshotNeo account.

9. Frequently asked questions

Is a PDF returned by a screenshot API always a picture?

No. Browserless documents its PDF endpoint as using Chrome’s print engine and producing selectable text. Check the specific endpoint and output rather than assuming PDF means an image embedded in a file.

Should I generate a PDF in the browser or use a hosted API?

Use browser automation when you need direct control and can operate browser workers. A hosted API can reduce browser infrastructure work. Compare operational needs and the same representative pages before deciding.

Can a webpage become one continuous PDF page?

Some providers document a full-page or fit-to-one-sheet mode. Test the resulting dimensions and readability; it is different from a paginated document.

Which API is fastest?

The cited documentation does not provide comparable independent benchmarks. Measure your own pages, settings, and expected concurrency.