Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Puppeteer’s page.screenshot() method with fullPage: true. The flag tells Puppeteer to capture the rendered page beyond the current viewport; it defaults to false, so set it explicitly. The example below navigates to a URL, writes a PNG, and always closes the browser even if navigation or capture fails.

Minimal full-page screenshot

Install Puppeteer in a Node.js project, then create a script such as screenshot.mjs:

import puppeteer from 'puppeteer';

const browser = await puppeteer.launch();
try {
  const page = await browser.newPage();
  await page.goto('https://example.com');
  await page.screenshot({
    path: 'full-page.png',
    fullPage: true
  });
} finally {
  await browser.close();
}

Run it with node screenshot.mjs. Puppeteer saves full-page.png in the current directory. The documented meaning of fullPage: true is “takes a screenshot of the full page.”

The launch, navigation, capture, and close sequence follows Puppeteer’s Page API flow. See the ScreenshotOptions documentation for the current option definitions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Install and prepare Puppeteer

Create a project

  1. Install a supported Node.js release.
  2. Create a directory and initialize it: mkdir page-capture && cd page-capture && npm init -y.
  3. Install Puppeteer: npm install puppeteer. The package downloads a compatible browser unless your project is configured to use an existing executable.
  4. Save the script as screenshot.mjs, or set "type": "module" in package.json if you prefer a .js file with import syntax.

Choose navigation behavior

page.goto() resolves according to its wait option. For pages that continue loading resources, specify a timeout and a less eager or more eager readiness condition deliberately:

await page.goto('https://example.com', {
  waitUntil: 'networkidle2',
  timeout: 60000
});

This waits until there are no more than two network connections for the relevant idle window. It does not prove that a site’s animations, lazy images, or application data are visually settled; those require page-specific preparation.

Make dynamic pages capture-ready

Wait for a selector

If the meaningful content appears after an API request, wait for an element that identifies completion:

await page.goto('https://example.com/dashboard', { waitUntil: 'domcontentloaded' });
await page.waitForSelector('[data-report-ready]', { timeout: 30000 });
await page.screenshot({ path: 'dashboard.png', fullPage: true });

Wait for a known delay

A short delay can accommodate a predictable animation or client-side render, but it is less reliable than waiting for a state marker:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
await new Promise(resolve => setTimeout(resolve, 1500));

Load lazy content

Full-page extent and content readiness are separate concerns. If images load only after scrolling, scroll through the document before capturing:

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
await page.evaluate(async () => {
  await new Promise(resolve => {
    let y = 0;
    const step = 600;
    const timer = setInterval(() => {
      window.scrollBy(0, step);
      y += step;
      if (y >= document.body.scrollHeight) {
        clearInterval(timer);
        window.scrollTo(0, 0);
        resolve();
      }
    }, 100);
  });
});
await page.screenshot({ path: 'long-page.png', fullPage: true });

This is an implementation technique, not a guarantee: sites can use intersection observers, delayed requests, or virtualized lists that need application-specific triggers.

Hide overlays before capture

Dismiss a consent dialog with a click, or hide a nonessential element with CSS:

await page.addStyleTag({
  content: '.cookie-banner, .chat-widget { display: none !important; }'
});

Use selectors that belong to the site you control; hiding elements can alter the page layout and should not be used when the overlay itself is the subject of the capture.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Screenshot options that matter

Option Use Important behavior
fullPage Capture the complete page rather than only the viewport. Defaults to false; set true explicitly.
path Write the image to disk. The filename extension is used to infer the image type.
type Select png, jpeg, or webp where supported. PNG is the documented default.
quality Adjust lossy image compression. Applies to formats other than PNG.
clip Capture a rectangular region. Use coordinates and dimensions when a full page is not wanted.
captureBeyondViewport Control capture outside the viewport. Its documented default depends on whether a clip is supplied.
omitBackground Preserve transparency. Defaults to false; useful with transparent page backgrounds.

Without path, page.screenshot() returns image bytes as a Uint8Array. You can write those bytes yourself or send them to storage:

const bytes = await page.screenshot({ fullPage: true, type: 'webp', quality: 82 });
await import('node:fs/promises').then(fs => fs.writeFile('page.webp', bytes));

Viewport, device scale, and stable output

Set the viewport before navigation when the screenshot must match a known layout:

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
await page.setViewportSize?.({ width: 1440, height: 900 });

For current Puppeteer versions, use the page viewport API available in your installed release; projects commonly set width, height, and device scale factor through the browser context or page configuration. Verify the exact method in the versioned API documentation because viewport APIs can differ between releases.

Disable motion when visual consistency matters:

await page.addStyleTag({ content: `*, *::before, *::after {
  animation: none !important;
  transition: none !important;
}` });

Fonts, third-party scripts, geolocation, authentication, and time zones can all change rendering. Supply cookies or headers before navigation when the page requires a session, and use a test account rather than exposing production credentials in source code.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Screenshot versus PDF

Choose a screenshot when the deliverable is one raster image of the rendered page. Choose page.pdf() for a paginated document:

await page.goto('https://example.com', { waitUntil: 'networkidle2' });
await page.emulateMediaType('screen');
await page.pdf({ path: 'page.pdf', format: 'A4', printBackground: true });

Puppeteer generates PDFs using print media by default. Call page.emulateMediaType('screen') when the PDF should follow screen styles. PDF pagination, margins, paper size, and print CSS make it a different output from one long image.

Troubleshooting

The image contains only the visible viewport

Check that the option is exactly fullPage: true, not a string such as 'true'. Also ensure another screenshot call is not overwriting the intended file.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Images or data are missing

Wait for a content selector, use an appropriate waitUntil condition, or trigger lazy loading by scrolling. A full-page flag does not wait for every site-specific asynchronous asset.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Navigation timeout exceeded

Raise the timeout for a slow page, investigate blocked third-party requests, or use domcontentloaded followed by explicit waits. Avoid setting an unlimited timeout in unattended jobs without an external job deadline.

Cookie banners, chat, or popups cover content

Click the site’s dismiss control, wait for it to disappear, or inject narrowly scoped CSS. Verify that the resulting layout is acceptable before storing the image.

The browser fails to launch in CI

Check that the Puppeteer browser was installed, that the runtime has required sandbox permissions, and that the executable path matches the installed browser. Capture launch stderr in CI logs and pin dependency versions for repeatable builds.

The file is unexpectedly large

Use JPEG or WebP with an appropriate quality, reduce the viewport width when that matches your requirement, or capture a specific element. Lossy formats can introduce artifacts around text and sharp UI edges.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

The page changes between runs

Use deterministic test data, fixed viewport and timezone settings, stable authentication, disabled animations, and explicit waits. Third-party ads and live widgets may still change unless blocked or mocked.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Running captures reliably at scale

  • Always close the browser in a finally block.
  • Use one browser with controlled page concurrency rather than launching a process for every URL.
  • Set navigation and overall job deadlines; record URL, status, duration, and output size.
  • Retry transient network failures with a limit and backoff, but do not blindly retry authentication or 4xx errors.
  • Write to unique temporary names, then rename after a successful capture to avoid publishing partial files.
  • Restrict untrusted URLs to prevent server-side request forgery, and isolate credentials from page content.

Or skip the browser setup

ScreenshotNeo provides a hosted screenshot API and MCP server. One GET request returns a PNG, JPEG, WebP, or PDF. It accepts cookie and consent banners like a visitor, removes more than 60 known consent platforms plus newsletter popups and chat widgets before capture, and lets you turn each cleanup step off. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; response headers identify the page verdict and whether it was billed.

cURL

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

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = new Uint8Array(await res.arrayBuffer());
await import('node:fs/promises').then(fs => fs.writeFile('shot.webp', data));

See the ScreenshotNeo API documentation for options. Its 63 options include full-page capture with lazy images loaded, CSS-selector element capture, dark mode, device presets and custom viewports, retina scale, PDF paper and page ranges, custom CSS and JavaScript, clicks, waits, request blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparency, resizing, TTL caching, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage data, and an OpenAPI specification. An MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients.

The Free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; yearly billing provides two months free, and every feature is available on every plan. Create a free ScreenshotNeo account to start with the no-card allowance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Does fullPage capture content inside an iframe?

It captures the page document’s full layout; an iframe is a separate document. Navigate to or capture the frame’s content separately when that embedded document is the target.

Can I return screenshot data instead of creating a file?

Yes. Omit path; Puppeteer returns screenshot bytes as a Uint8Array by default, which you can store or stream yourself.

Why use a PDF instead of a full-page PNG?

Use PDF when pagination, paper dimensions, selectable text, or print CSS matter. Use the screenshot API when you need one raster image of the rendered page.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.