Home/Blog/012
012 · How-to · May 2026

Webpage to
PDF.

~4 minute read Three routes that actually work, and the failure modes nobody tells you about.

You want a webpage saved as a PDF. Maybe to archive an article before the site redesigns and breaks the link. Maybe to email a receipt to accounting. Maybe to print a recipe without ten ads and a popup video. Whatever the reason, there are roughly three ways to do it, and the right one depends on what kind of page it is.

Here's the short version, then the details.

  1. Browser print-to-PDF — fastest, works on any page, captures what's on screen.
  2. Save as HTML, then convert — best for archival; preserves the source so you can re-render later.
  3. Online converter — useful when you already have an HTML file or need a batch.

Method 1: Print to PDF (the everyday route)

Every modern browser does this. It's the right answer 80% of the time.

Chrome, Edge, Brave, Arc, Opera: Cmd+P (Mac) or Ctrl+P (Windows/Linux). In the print dialog, change the destination to Save as PDF. Pick a layout, hit Save.

Safari: Cmd+P, then in the bottom-left of the print dialog click PDF → Save as PDF. Or use the Cmd+S shortcut, which on Safari saves the page as a web archive but doesn't give you a PDF — make sure you're in the print dialog.

Firefox: Same Cmd+P / Ctrl+P, but Firefox has a built-in PDF rendering option labelled Save to PDF in the destination dropdown.

On mobile it's the same idea, just buried deeper. iOS Safari: tap the share sheet, then Options → Send as PDF, or pinch-out on the print preview. Android Chrome: three-dot menu → Share → Print → Save as PDF.

The good: it captures the page as your browser sees it right now, JavaScript and all. Single-page apps render correctly. Dynamic content like a loaded comment thread or an interactive chart shows up in the PDF.

The bad: layout is unpredictable. Sidebars, sticky headers, cookie banners, and ads all leak into the PDF unless the site has a proper print stylesheet. If the page is paginated (long article, multi-page forum thread), you get one PDF per visible page — not the whole article. And you can't batch.

Method 2: Save as HTML, then convert

This is the right route when you care about the source. Maybe you're archiving for legal reasons. Maybe the page might change. Maybe you'll need to re-render it later with different settings.

In any browser: Cmd+S (Mac) or Ctrl+S (Windows). Pick Webpage, Complete in the save dialog. The browser drops a .html file plus a folder of assets (images, CSS, JS) alongside it.

Now you have the source. To make a PDF: open the saved .html in your browser and print-to-PDF, or upload it to our HTML to PDF converter and let it render.

The advantage of the converter route is reproducibility. Our renderer respects @media print stylesheets, embeds the page-referenced images, and keeps hyperlinks clickable in the resulting PDF. The output looks the same every time you re-run it. If you saved the HTML six months ago and want a new PDF today, run it through the converter and you get the same result you would have gotten then.

Method 3: Use the converter directly

If you've already got an HTML file — exported from a CMS, downloaded from somewhere, generated by a build script — skip the browser. Drop it on formatly.app, pick PDF from the dropdown, hit Convert.

This is also the right route for batches. Five HTML files at a time, no clicking through five print dialogs.

One caveat that catches people: relative-path images won't render in the converter unless they're uploaded too. If your HTML has <img src="images/photo.jpg"> and you only upload the HTML, the photo won't appear in the PDF. Either zip the HTML with its assets folder and upload the zip, or rewrite the image paths to absolute URLs before converting.

The JavaScript problem

Most "convert URL to PDF" tools, including ours, render the HTML statically. They don't execute JavaScript. For traditional server-rendered pages (Wikipedia, most blogs, GitHub README files, news articles) this is fine — the content is in the initial HTML.

For single-page apps (a Notion document, a Linear ticket, a Figma comment thread, most modern dashboards) the initial HTML is essentially an empty shell that JavaScript fills in after the page loads. Static rendering gets you a blank PDF.

The fix is the print-to-PDF method. Your browser has already executed the JavaScript by the time you hit print, so the PDF captures the fully rendered DOM.

The infinite-scroll problem

Pages that load content as you scroll (Twitter threads, Reddit comments, Pinterest, image galleries) only have the visible portion in the DOM until you scroll further. Print-to-PDF captures only what's loaded.

Workaround: scroll all the way to the bottom first, slowly enough that everything has time to load, then print. The browser will include everything that's now in the DOM. For very long threads this can produce a 50-page PDF — which may or may not be what you want.

Paywalls, cookie banners, and reader mode

If you're trying to PDF an article behind a paywall, the PDF will include the paywall. Conversion isn't a workaround for access control.

For cookie banners and other modal overlays, dismiss them in the browser before printing. They're real DOM elements and will be captured.

For ad-heavy pages, switch to your browser's reader mode first (Safari has a built-in Cmd+Shift+R, Firefox has the reader icon in the URL bar, Chrome has it as a flag). Reader mode strips the cruft and gives you a clean text-and-images view that prints much better than the original layout.

Which method when

One-off, dynamic page (a Notion doc, a dashboard, a SPA): browser print-to-PDF.

One-off, server-rendered page (an article, a documentation page): reader mode, then print-to-PDF. Or our converter if the page has a clean download.

Archiving for the future: save as HTML (Webpage, Complete), then run through our converter. You keep the source.

Batch of HTML files: our HTML to PDF converter directly, up to five at a time.

A receipt you need to email immediately: print-to-PDF, attach, send. Total elapsed time: 30 seconds.

Related