ScreenshotNeo

BlogHow-to

How to Save a Long Webpage as a PDF

Save an entire long webpage as a PDF on desktop, Android, iPhone, or with code—and fix missing content, clipped columns, and blank pages.

By the ScreenshotNeo team1 October 20267 min read

Short answer: Open the webpage, wait for all required content to load, open your browser’s Print dialog, choose Save as PDF, review the page range and preview, then save the file. On a long or dynamic page, always inspect the last PDF page because print output can differ from what you see on screen.

1. Save a long webpage as a PDF on desktop

Google Chrome

  1. Open the page and wait for images, charts, and lazy-loaded sections to appear.
  2. Press Ctrl+P on Windows or Linux, or Command+P on macOS. You can also choose File → Print.
  3. In the destination list, choose Save as PDF.
  4. Review the preview. Check the final page, page range, orientation, paper size, scale, margins, and whether background graphics are needed.
  5. Click Save, select a filename and folder, then reopen the PDF and inspect it.

Chrome documents the desktop print-preview workflow and shortcuts in its official help: Print from Chrome.

Firefox

  1. Open the Firefox menu and choose Print.
  2. Set the destination to Save to PDF.
  3. Choose the page range, orientation, paper size, scale, margins, headers and footers, color, and print-background settings you need.
  4. If the page has heavy navigation or advertising, try Simplified format when Firefox offers it.
  5. Save the file and check that the last section is present.

Firefox notes that a page can be configured to print differently from its screen layout, so inspect the preview and the saved file. See Mozilla’s printing guide.

Microsoft Edge

  1. Open Settings and more → Print, or press Ctrl+P on Windows or Command+P on macOS.
  2. Choose the PDF destination provided by the print dialog.
  3. Set the page range, layout, scale, and margins.
  4. Under More settings, enable Background graphics when background colors or images carry meaning.
  5. Save and reopen the PDF.

For cleaner reading, Edge documents using Immersive Reader before printing when a site supports it. See Microsoft’s Edge printing instructions.

2. Save a long webpage on Android

  1. Open the page in Chrome and wait for the content you need.
  2. Tap More → Share → Print.
  3. In the print preview, choose Save as PDF.
  4. Select a folder and tap Save.

Google’s Android instructions use this Share/Print route and explicitly describe choosing Save as PDF: Chrome for Android help. Menu labels can vary by app version.

Firefox for Android also provides a save-webpage-as-PDF feature that places the file in Downloads; its current menu path is documented in Mozilla’s mobile help.

3. Save a long webpage on iPhone

Safari

  1. Open the webpage in Safari.
  2. Tap Share, then choose Markup.
  3. Tap the completion control and save the generated PDF to the Files app.

Apple’s guide covers this Share → Markup workflow; the position of the Share or Page Menu button depends on whether Safari’s tab layout is at the top or bottom. See Apple’s iPhone guide.

Firefox for iOS

  1. Open the page and take a screenshot.
  2. Choose Full Page in the screenshot editor.
  3. Tap Done, then choose Save as PDF.

This full-page route is documented by Mozilla for Firefox on iOS. It is not a universal method for every browser or dynamic site.

4. Make sure the whole page is included

  • Wait for lazy content: scroll through the page once so images and sections load before opening Print.
  • Check the last preview page: a truncated preview usually means content had not loaded or the selected page range is incomplete.
  • Use landscape for wide tables: reduce scale or widen the paper orientation when columns are clipped.
  • Adjust margins and scale: large margins can force awkward page breaks; very small scale makes text unreadable.
  • Enable backgrounds selectively: backgrounds preserve visual meaning but increase ink and file size.
  • Hide clutter: use Firefox Simplified format or Edge Immersive Reader when available.
  • Expand accordions and tabs: print engines generally cannot include content that remains collapsed or is never rendered.
  • Check embedded frames: content inside an iframe, cross-origin viewer, or embedded document may print separately or be omitted.

Print-to-PDF creates a paginated document. Chrome’s Save Page As command creates a webpage file instead, which is a different output and is useful only when you want an offline browser copy. See Chrome’s Save Page As help.

5. Automate PDF capture with Playwright

For repeatable captures, a headless browser can wait for network activity, set a print layout, and write a PDF. Install Playwright with npm install playwright, then save this as save-page.js:

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

(async () => {
  const browser = await chromium.launch();
  const page = await browser.newPage({ viewport: { width: 1440, height: 1000 } });
  await page.goto('https://example.com/long-page', { waitUntil: 'networkidle', timeout: 90000 });
  await page.emulateMedia({ media: 'print' });
  await page.pdf({
    path: 'long-page.pdf',
    format: 'A4',
    printBackground: true,
    margin: { top: '16mm', right: '12mm', bottom: '16mm', left: '12mm' }
  });
  await browser.close();
})();

Run it with node save-page.js. Replace the URL with the page you control or are authorized to capture. For pages that continue loading after network idle, add an explicit wait for a known selector before calling page.pdf().

Python Playwright

Install with pip install playwright and playwright install chromium:

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page(viewport={"width": 1440, "height": 1000})
    page.goto("https://example.com/long-page", wait_until="networkidle", timeout=90_000)
    page.emulate_media(media="print")
    page.pdf(
        path="long-page.pdf",
        format="A4",
        print_background=True,
        margin={"top": "16mm", "right": "12mm", "bottom": "16mm", "left": "12mm"},
    )
    browser.close()

6. Troubleshooting missing or broken output

Symptom Likely cause Fix
The PDF stops halfway down Lazy content had not loaded, or the print range is limited Scroll through the page, wait, reopen Print, and verify the range includes all pages.
Images are blank Images load after printing, require scrolling, or are blocked Wait for them, reload without extensions, and confirm they appear before printing.
Columns are cut off Portrait layout, oversized content, or margins Use landscape, reduce scale, or reduce margins.
Colors or diagrams disappear Background graphics are disabled Enable background graphics in the print settings.
Text is tiny Scale was reduced to fit a wide layout Use landscape, a larger paper size, or print selected sections separately.
Headers overlap body text Fixed-position site navigation is being printed Use simplified/reader mode, hide the header with print CSS, or capture with a browser script.
Cookie dialog or chat bubble covers content The overlay was still present at capture time Accept or dismiss it, disable the widget, use reader mode, or remove it with print CSS.
Charts or videos are missing Interactive content may not have a printable representation Wait for a rendered fallback, export the chart separately, or use a screenshot for that section.
Fonts look different Web fonts had not loaded or are unavailable offline Wait for fonts, keep the browser online, and verify the saved PDF on another device.
PDF is huge Large background images or uncompressed assets Disable backgrounds that are decorative, reduce image content, or compress the PDF afterward.

7. Reliability, privacy, and cost considerations

  • Reliability: browser printing depends on the page’s current state. Dynamic feeds, ads, consent dialogs, and client-side rendering can change between captures.
  • Repeatability: use a fixed viewport, wait for a selector, and record the URL and capture time when PDFs are part of a workflow.
  • Privacy: do not upload authenticated or private pages to a service unless its handling meets your requirements. Local browser printing keeps the capture on your device.
  • Cost: the built-in browser workflows require no separate hardware or subscription. Automated browser jobs consume your own compute and storage.
  • Accessibility: a print PDF may not preserve every interactive behavior or semantic relationship. Keep the source URL alongside the PDF.

8. Or skip the browser setup

ScreenshotNeo can capture a webpage as a PDF through one GET request. Its capture flow accepts consent banners before the shot and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. PDF settings include paper size, margins, landscape mode, and page ranges.

See the ScreenshotNeo API documentation for the full option list.

cURL

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

Python

import requests

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

Node.js

const q = new URLSearchParams({
  access_key: 'YOUR_API_KEY',
  url: 'https://example.com/long-page'
});
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
require('fs').writeFileSync('long-page.pdf', Buffer.from(await res.arrayBuffer()));

ScreenshotNeo also offers full-page capture with lazy images loaded, custom CSS and JavaScript, waits for selectors or network idle, request blocking, custom headers and cookies, caching with a chosen TTL, asynchronous jobs with signed webhooks, bulk capture for up to 100 URLs per call, and an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI clients such as Claude and Cursor.

Free usage includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

9. FAQ

Does Save as PDF create one very tall page?

No. Browser print output normally creates a paginated PDF based on paper size, margins, and scale.

Why is the saved PDF different from the webpage?

Sites can use print-specific CSS, omit backgrounds, hide navigation, or render content only after interaction. Review the print preview and wait for dynamic sections.

Should I use Save Page As instead?

Use Save Page As when you want an offline webpage package for browser viewing. Use Print → Save as PDF when you need a portable, paginated document.

Can I save only part of a long page?

Use a page range in the print dialog when the browser exposes one, or select and print the relevant content if the site supports it.

What if the page requires a login?

Print it locally while signed in, or use an authorized automated session that supplies the required authentication. Do not expose private URLs or credentials in shared jobs.