Guides

Guides for screenshots, PDFs and browser jobs

Find the failure. Reproduce it. Fix it. Every guide starts from a symptom you can trigger on purpose, builds the smallest Puppeteer or Playwright version that works, and says exactly where that version breaks — before it shows you an API request.

The code on these pages is executed against fixtures on a schedule, and each guide publishes what it costs, which limits apply and which errors you should expect. When the DIY version is the right answer, the guide says so.

14 guides · dated verification · runnable recipes

01 / 02

PDF and report generation

Turning HTML or a live page into a document someone keeps: print CSS, pagination, fonts, and delivering reports on a schedule.

5 guides

02 / 02

Screenshots and web capture

Capturing pages you do not control: lazy loading, full-page output, serverless browsers, SSRF and browser job queues.

9 guides

014 min
how to take a full-page screenshot with Puppeteer

Full-page screenshots with Puppeteer — and where they break

The output has blank image slots below the first fold, a sticky header repeated through the image, or a blank/truncated tail on a very tall document.

023 min
Playwright screenshot in serverless

Running Playwright screenshots in serverless functions

Intermittent 5xx responses around deploys and traffic spikes, with most of the request budget spent before page.goto() starts.

034 min
avoid incomplete lazy-load screenshots

Why lazy-loaded content is missing from screenshots

The page height is correct but image boxes below the fold are blank, low-resolution placeholders remain, or later list rows never exist in the DOM.

043 min
load fonts in HTML to image

Loading web fonts reliably in HTML-to-image jobs

Production images wrap one word earlier than local output, use a system font, or shift between otherwise identical captures.

054 min
choose PNG or JPEG for a generated image

PNG or JPEG when your application generates the image

Text picks up a halo of grey speckle at the edges of glyphs, or a 1200x630 card leaves the renderer as a multi-megabyte PNG that a CDN then serves on every page view.

064 min
why a transparent background renders white

Why a transparent background arrives white, and how to keep the alpha

A logo, badge or card exported for use over an unknown background arrives with a white rectangle around it, and the CSS inspector insists the background is transparent.

074 min
SSRF security in screenshot APIs

SSRF defense for screenshot APIs

A public hostname reaches loopback, cloud metadata, RFC1918, Kubernetes service DNS or a custom storage/webhook endpoint that the caller could not access directly.

084 min
queue retry idempotency for browser jobs

Queue, retry and idempotency for browser jobs

Two workers render the same request, the loser overwrites success with failure, a webhook fires twice, or usage contains a charge with no successful request left to justify it.

094 min
screenshot API build vs buy calculator

Build vs buy a screenshot API: an editable calculator

A confident annual-savings number whose result changes completely when one hidden engineering-hours assumption is made visible.

Code on these pages is re-executed against fixtures on a schedule. When a run fails or falls outside the re-execution window, the page stops claiming it was verified.

Editorial method

Useful before persuasive

A guide has to answer the technical question before it mentions PageCapture — well enough that you could finish the job without us and decide that is the better trade.

  1. 01
    Reproduce

    Start from an observable symptom.

  2. 02
    Build

    Show the smallest DIY version.

  3. 03
    Draw the boundary

    Say where DIY works and where it breaks.

  4. 04
    Verify

    Run the published recipe against a fixture.

PageCapture Engineering writes these guides. Editorial ownership belongs to @thalesvinif, the project maintainer. Each article names its reviewer and verification date. Browser facts link to primary documentation; product limits link back to the public PageCapture contract.

The published request is normalized by the same contract as the API, generated snippets receive syntax checks, and the scheduled verification job executes them against controlled fixtures. The dated badge expires when that run falls outside the verification window.