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

Use Puppeteer’s page.screenshot({ fullPage: true }) to capture a page beyond the visible browser window. Set a fixed viewport, wait for the page’s real content to render, then save the screenshot. For more direct control, Chrome DevTools Protocol (CDP) exposes Page.captureScreenshot with captureBeyondViewport: true.

Take a full-page screenshot with Puppeteer

Puppeteer is a JavaScript browser-automation library for Chrome and Firefox. Its screenshot API is the simplest fit for a repeatable full-page capture; Chrome for Developers describes screenshots and PDF generation among Puppeteer’s uses (Puppeteer documentation).

1. Install Puppeteer

In a new project, install Puppeteer with npm:

npm install puppeteer

Puppeteer installs a compatible browser as part of its standard installation. If your environment supplies its own Chrome or Chromium binary, configure the launch options for that installation and ensure the executable is available to the process.

2. Save a screenshot of the whole page

Save the following as screenshot.mjs:

import puppeteer from 'puppeteer';

const browser = await puppeteer.launch({ headless: true });
try {
  const page = await browser.newPage();
  await page.setViewport({ width: 1440, height: 900 });
  await page.goto('https://example.com', { waitUntil: 'networkidle2' });
  await page.screenshot({ path: 'page.png', fullPage: true });
} finally {
  await browser.close();
}

Run it with:

node screenshot.mjs

The resulting page.png is written in the current directory. Change the URL and output path to suit your task. The explicit viewport makes the page’s responsive layout more reproducible; fullPage: true is the option that requests the full page rather than only the viewport (Puppeteer ScreenshotOptions reference).

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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.

Choose a wait condition that fits the site

waitUntil: 'networkidle2' waits for network activity to settle, but it is not proof that every visible component has finished rendering. Pages with long-lived requests, delayed application data, or animations may need a different wait strategy. For a known page element, wait for that selector before capturing:

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

Use a selector that indicates the content you actually need, not merely a generic page container that appears before its data arrives.

Make the capture reflect the page you intend to save

A full-page option controls the screenshot’s extent, not the application’s readiness or behavior. Decide what “whole page” means for your target, then stabilize that page before invoking the screenshot method.

Viewport and responsive layout

Set the viewport before navigation when the page’s responsive layout depends on screen size. A desktop viewport can produce a different layout and page length from a mobile viewport. Keep the width, height, and any device scale settings consistent across runs if you compare screenshots or use them in a visual workflow.

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

Fonts, images, and delayed content

Some pages render text before web fonts load, or insert images after the initial navigation event. When the exact appearance matters, wait for the relevant content and assets. For example, after navigation you can wait for images to report completion:

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 document.fonts.ready;
  await Promise.all(
    [...document.images].map((image) => {
      if (image.complete) return Promise.resolve();
      return new Promise((resolve) => {
        image.addEventListener('load', resolve, { once: true });
        image.addEventListener('error', resolve, { once: true });
      });
    })
  );
});

This waits for fonts and for images currently present in the document; it does not force content that has not yet been added to the page to appear. For application data, wait for the application’s own ready state or a specific selector.

Lazy loading and infinite scroll

Lazy-loaded images may not load until their area approaches the viewport. An infinite-scroll page may create new content only after scrolling. A full-page screenshot request does not itself guarantee that such content has been loaded. If you need it, scroll through the page in controlled increments and wait for new content or images to load; stop according to a defined application-specific condition. Infinite feeds may never have a natural end, so choose a bounded capture target rather than attempting to capture an unending page.

Consent dialogs and overlays

Authentication, cookie dialogs, newsletter prompts, and chat widgets are part of the rendered page unless your workflow handles them. If you need a clean page, use the site’s normal consent controls or your authorized test setup before capturing. Do not assume a full-page capture dismisses or removes overlays.

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

Animation and changing content

Carousels, videos, clocks, and animated transitions can make otherwise identical captures differ. For consistent output, wait until transitions finish or disable animation in a controlled test context with CSS. Avoid altering production page behavior unless you understand the effect on the screenshot.

Choose screenshot output options

Puppeteer’s screenshot options cover common output and file-handling needs. The options documented in the API reference include path, type, quality, encoding, omitBackground, fullPage, and captureBeyondViewport (ScreenshotOptions).

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.
  • path writes the capture to a file, as in the example.
  • type selects an image format such as PNG, JPEG, or WebP where supported by the API. PNG is useful when you want lossless output; JPEG is commonly used for photographic content. Choose based on the downstream system’s format requirements.
  • quality applies to lossy formats such as JPEG and WebP; it is not a way to increase PNG quality.
  • encoding controls whether the API returns encoded data or a buffer, depending on the selected value and API behavior.
  • omitBackground requests a transparent background rather than the default page background where the captured content permits it.
  • fullPage requests the page’s full content area instead of just the current viewport.
  • captureBeyondViewport controls capturing beyond the viewport; it is also relevant to lower-level CDP usage.

Check the API reference for the exact option types and behavior in the Puppeteer version installed in your project. If you need bytes for an upload rather than a file, omit path and use the returned screenshot data in your application.

Use Chrome DevTools Protocol directly

For direct control over Chrome’s screenshot command, CDP provides Page.captureScreenshot. Its captureBeyondViewport parameter is documented as capturing beyond the viewport; the response contains base64-encoded image data and supports PNG, JPEG, and WebP formats (CDP Page.captureScreenshot reference).

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

A CDP client must first connect to a Chrome debugging session, enable or initialize the relevant page domain as required by that client, navigate, and wait for the page to stabilize. The essential command is conceptually:

{
  "method": "Page.captureScreenshot",
  "params": {
    "format": "png",
    "captureBeyondViewport": true
  }
}

Decode the returned data value from base64 to obtain image bytes, then write or pass those bytes to your next step. Exact connection and command-sending code depends on the CDP client and how Chrome was launched; the method’s parameters and response are protocol-level, not a standalone command-line invocation.

Puppeteer or direct CDP?

  • Choose Puppeteer when you want navigation, waits, page interaction, and screenshot output through one browser-automation API.
  • Choose direct CDP when you already manage a CDP connection and need to issue Chrome protocol commands yourself.
  • Do not expect CDP to make an unready page ready: it controls capture, while your workflow still needs to handle navigation, application state, and output decoding.

Chrome’s headless guidance notes that full-page screenshots require more involved handling than the basic --screenshot flag, which is why a browser-automation API is useful for repeatable captures (Chrome Headless mode).

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

Or skip the browser setup

ScreenshotNeo can return a screenshot or PDF from one GET request. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots, and 1,000 screenshots a month are free with no card; paid plans start at $5 for 3,000. Every plan includes the listed features.

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

For full-page output, adapt the URL and format as needed. See the ScreenshotNeo API documentation for request options and response behavior:

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

Sign up for 1,000 free screenshots a month, with no card required.

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

Troubleshoot full-page captures

The image shows only the viewport

Confirm that the screenshot call includes fullPage: true. If you are using CDP instead, set captureBeyondViewport: true on Page.captureScreenshot. Also verify that the page was navigated to the expected URL and that you are examining the newly written output file.

Images or data are missing

The screenshot may have been taken before the content rendered, or lazy-loaded content may not have been requested. Wait for the target selector, application state, fonts, or images that matter. For lazy-loaded or infinite-scroll content, deliberately trigger loading and define when to stop.

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

The page is blank or incomplete

Check whether navigation failed, timed out, or reached a page that requires authentication or interaction. Inspect the page URL and browser console or network errors in your automation workflow. Increase the navigation timeout only when the page genuinely needs more time; a longer timeout does not repair a broken request or missing prerequisite.

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 script hangs at network idle

Some sites keep connections open for analytics, updates, or streaming. Use a different navigation readiness event such as domcontentloaded, then wait for a meaningful selector or application-specific signal. This avoids making network quiet a requirement when the site never becomes fully quiet.

The output differs between runs

Fix the viewport and browser setup, wait for fonts and dynamic content, and control animations or rotating content in your test context. Differences can also come from personalized page state, consent choices, authentication, or content that changes over time.

The CDP result is not a usable image file

The protocol returns image data encoded as base64. Decode that field to bytes before writing it as a PNG, JPEG, or WebP file; writing the base64 text itself produces a file that image viewers may not recognize.

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

Performance, reliability, and cost considerations

Full-page captures can produce much larger images than viewport captures, especially on long pages or at high device scale. Keep only the page dimensions and image fidelity your use case needs, and avoid capturing an unbounded infinite feed. For a repeated workflow, reuse a managed browser process where appropriate, close pages and browser instances reliably, and bound navigation and element waits so a failed site does not stall a batch indefinitely.

The official references document API behavior and image formats, not a universal maximum page height or speed benchmark. Actual completion time and output size depend on the page, its assets, browser environment, and the work your script performs before capture. A local Puppeteer workflow avoids a per-request hosted screenshot charge but requires you to operate the browser environment; hosted APIs trade that setup for service pricing and their own request behavior. Compare costs against your volume and operational requirements rather than assuming one approach is always cheaper.

Frequently asked questions

Does a full-page screenshot capture content below the fold?

Yes, when the page content is present and the screenshot method is configured for full-page or beyond-viewport capture. It does not automatically cause every lazy-loaded or infinite-scroll item to load.

Can I save a full-page screenshot as WebP?

Yes. Puppeteer and CDP document WebP among supported screenshot formats; specify the format in the relevant API and check the version’s option reference for exact details.

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

Is a full-page screenshot the same as printing to PDF?

No. A screenshot is a raster image of rendered pixels. A PDF is a document output with pagination and print-layout behavior; use a PDF workflow when selectable text or page-based printing matters.

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.