SwitchPDF
All articles
Convert June 29, 2026 4 min read

Converting a Web Page to PDF for Archival or Reference

Web pages disappear, change, or paywall over time. Archiving important ones as PDFs preserves them in a stable format.

Web pages are ephemeral. The article you found useful last year might be paywalled now, removed, or behind a redesigned URL. Archiving important pages as PDF preserves them in a stable, shareable format.

Two ways to capture

Browser's print-to-PDF

Built into every modern browser:

  • Chrome / Edge: Cmd/Ctrl + P → Destination: Save as PDF
  • Safari: File → Export as PDF
  • Firefox: Cmd/Ctrl + P → Save to PDF

This works fine for simple pages. For pages with complex layouts, ads, or interactive elements, the browser's "Print" CSS strips a lot of content — sometimes too much.

SwitchPDF HTML to PDF

SwitchPDF HTML to PDF renders the page in headless Chrome and exports the PDF. Same engine, but you get options the browser doesn't expose:

  • Include or exclude page background
  • Custom paper size
  • Margins
  • Optional header/footer

Useful when the browser's default print rendering drops something important.

When archiving matters

  • Reference material for projects (Stack Overflow answers, Wikipedia revisions, technical articles)
  • Receipts and confirmations from web purchases — saved as proof
  • Job listings when you're applying — they often get pulled after the role is filled
  • News articles behind paywalls — your one-time-read view, preserved
  • Documentation snapshots for software versions that may update

What about JavaScript-rendered pages?

Single-page apps (React, Vue, Svelte) render content client-side. Browser print sometimes captures the rendered state, sometimes doesn't. SwitchPDF's HTML to PDF uses headless Chrome which executes JavaScript first, then exports — usually captures the rendered state correctly.

For pages that take a while to load (lazy-loaded images, deferred JavaScript), wait a few seconds after the page loads before triggering print or conversion.

Pages requiring login

Neither browser print nor SwitchPDF can authenticate to a page on your behalf. For login-required pages:

  1. Open the page in your browser while logged in
  2. Use the browser's print-to-PDF (uses your session)
  3. Or: save the rendered HTML locally, then paste the raw HTML into SwitchPDF

Don't share login credentials with online tools.

Archive.org alternative

For pages that are already gone, try the Wayback Machine (archive.org). It stores snapshots of billions of pages. Search for the URL there before assuming the content is lost forever.

Bottom line

For occasional captures, browser print is fast. For higher-fidelity archival, HTML to PDF gives you more control. For pages that are already gone, try archive.org.

Related articles