Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
Headless Chrome

How to Capture a Full-Page Screenshot in Headless Chrome

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.

To capture an entire webpage—not just the part visible in the browser window—use Puppeteer or Playwright and set fullPage: true. For example, in Puppeteer: await page.screenshot({ path: 'page.png', fullPage: true }); Chrome’s --screenshot command is useful for a quick viewport screenshot, but its documented --window-size option sets the viewport; it is not a substitute for a framework’s full-page option.

Choose the right kind of screenshot

“Full page” can mean two different things: an image of the current browser viewport, or an image that extends through the page’s scrollable content. The distinction matters because increasing the viewport height is not the same as asking a browser automation API to capture the full page.

Method What it is suited for Relevant setting
Chrome Headless command line A quick screenshot of a configured viewport with little scripting --screenshot and --window-size
Puppeteer Node.js browser automation, including full-page capture fullPage: true
Playwright Browser automation with full-scrollable-page capture and image-scale control fullPage: true and scale
Chrome DevTools Protocol (CDP) Direct, lower-level control of Chrome’s screenshot operation Page.captureScreenshot and captureBeyondViewport

Chrome’s Headless CLI documents --screenshot and --window-size; its example saves screenshot.png in the current working directory. Puppeteer and Playwright document a separate full-page option. Choose an automation API when the image must extend beyond the viewport or when you need to wait for page content, set a viewport, or control image output.

Capture a full page with Puppeteer

Puppeteer’s fullPage: true option requests a screenshot of the full page. Set path to write the image to a file. The following Node.js example launches Chrome in Headless mode, opens a URL, waits for a page-specific element, and saves a PNG.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
const puppeteer = require('puppeteer');

async function capture() {
  const browser = await puppeteer.launch({ headless: true });
  try {
    const page = await browser.newPage();
    await page.setViewport({ width: 1365, height: 900 });
    await page.goto('https://example.com/', { waitUntil: 'networkidle0' });
    await page.waitForSelector('main', { timeout: 15000 });
    await page.screenshot({ path: 'page.png', fullPage: true });
  } finally {
    await browser.close();
  }
}

capture().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

Install and run it

  1. Install a current Node.js release and create a project directory.
  2. In that directory, run npm install puppeteer. Puppeteer’s package provides the browser automation API and downloads a compatible Chrome for Testing browser as part of its normal installation.
  3. Save the code as capture.js, replace https://example.com/ with the target URL, and change main to a selector that appears when the content you need is ready.
  4. Run node capture.js. On success, page.png is written to the working directory.

Wait for the content, not just the navigation

waitUntil: 'networkidle0' waits for network activity to settle according to Puppeteer’s navigation condition. That can be a useful first wait, but it is not proof that every element has rendered or that a page’s lazy-loaded content has been loaded. The selector wait makes the script check for a meaningful page element before taking the image. If the page loads key content later or only after scrolling, adapt the readiness check to that site; a fixed delay alone can be both unnecessarily slow and too short.

If you omit path from page.screenshot(), Puppeteer returns screenshot data instead of writing the file. The API also supports other screenshot options; consult the ScreenshotNeo documentation only for ScreenshotNeo-specific API behavior, and use the Puppeteer API documentation for Puppeteer option details.

Use Playwright for a full-scrollable-page image

Playwright uses the same basic fullPage: true option. This standalone Node.js example writes a PNG and closes the browser even if navigation or capture fails.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch({ headless: true });
  try {
    const page = await browser.newPage({ viewport: { width: 1365, height: 900 } });
    await page.goto('https://example.com/', { waitUntil: 'networkidle' });
    await page.waitForSelector('main', { timeout: 15000 });
    await page.screenshot({ path: 'page.png', fullPage: true, scale: 'css' });
  } finally {
    await browser.close();
  }
})().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

Install the package with npm install playwright, then install the browser binaries with npx playwright install chromium. Save the script as capture.js and run node capture.js. Playwright’s scale: 'css' produces one image pixel per CSS pixel. Its scale: 'device' option uses device-pixel resolution and can produce a larger, higher-resolution image. Select the scale based on the output you need rather than assuming a larger file is always preferable.

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

When Chrome’s command line is enough

For a simple viewport screenshot, use Chrome’s Headless CLI:

chrome --headless --screenshot --window-size=412,892 https://example.com/

The documented CLI behavior saves screenshot.png in the current working directory. Here, --window-size=412,892 configures the browser window size for the capture. This is a practical way to capture a page as seen in a particular viewport, but do not treat a tall --window-size as equivalent to the explicit full-scrollable-page behavior of Puppeteer or Playwright.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Chrome also documents a --timeout option that sets the maximum wait before capture. The timeout is a deadline: Chrome may take the screenshot when that time is reached even if the page is still loading. For client-rendered content, use browser automation when you need to wait for a selector or another page-specific readiness condition before capture.

Use CDP only when you need lower-level control

Chrome DevTools Protocol exposes screenshot capture as Page.captureScreenshot. The protocol’s captureBeyondViewport option defaults to false. If you drive CDP directly, determine and manage the capture dimensions deliberately; do not assume that calling the lower-level command automatically means “capture the full document.” For ordinary full-page automation, Puppeteer or Playwright is generally simpler because each offers a documented fullPage option.

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

Make the image representative and complete

  • Set the viewport deliberately. Viewport width can change responsive layout and therefore the image’s content and dimensions. Set it before navigation or capture when a specific desktop or mobile layout matters.
  • Wait for a meaningful condition. A navigation event, network quiet, selector, or delay each describes a different kind of readiness. Choose the condition that corresponds to the content the screenshot must contain.
  • Account for lazy loading. Some sites load images or other content only as a visitor scrolls. A full-page request does not establish that every site will load every lazy element before capture. If content is missing, determine what triggers it on that site and reproduce that behavior before capturing.
  • Review fixed and sticky elements. Headers, chat controls, and other fixed-position elements can appear in ways that affect the result. Their behavior depends on the site’s layout and scripts; there is no universal workaround established for every page.
  • Choose image scale with output in mind. On Playwright, CSS scale corresponds to CSS-pixel output, while device scale uses device-pixel resolution and may increase output size.
  • Treat access and page failures as real outcomes. A CAPTCHA, access-denied page, blank result, navigation error, or redirect can prevent the intended page from being captured. A screenshot API cannot make an inaccessible page available.

Troubleshooting common capture problems

The screenshot contains only the visible viewport

Cause: The capture used Chrome’s CLI screenshot or an automation screenshot without the full-page option. Fix: In Puppeteer or Playwright, set fullPage: true. Increasing --window-size changes the viewport; it is not the same documented setting.

Rank #4
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

The screenshot is blank or shows a loading state

Cause: Capture ran before client-rendered content appeared, the page did not finish loading, or access was blocked. Fix: Check the target URL in a normal browser, wait for a selector that indicates the needed content is present, and inspect navigation errors. A timeout should be treated as an upper bound, not confirmation that the page is ready.

Images or lower-page content are missing

Cause: The site may lazy-load content after scrolling or after another interaction. Fix: Identify the page-specific trigger and wait for the content after it occurs. Chrome’s Puppeteer guidance specifically cautions that lazy-loading sites may need a longer wait. A generic network-idle condition alone does not prove that all lazy content has loaded.

The script times out waiting for a selector

Cause: The selector does not exist on the target page, is inside a frame, or appears under a different state than expected. Fix: Inspect the page markup and use a selector for an element that reliably identifies the content you need. Increase the wait deadline only if the content is expected to arrive more slowly; a larger timeout cannot fix a wrong selector or an inaccessible page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

The output looks too large or too small

Cause: Viewport dimensions and image pixel scale are separate choices. Fix: Set a suitable viewport and, in Playwright, choose scale: 'css' for one output pixel per CSS pixel or scale: 'device' for device-pixel resolution. Device scale can produce larger images.

Chrome does not launch in a server or container

Cause: The browser may be missing, incompatible with the automation package, or unable to start in that environment. Fix: Confirm that the browser installation step completed and that the installed browser matches the automation setup. Check the environment’s browser launch error before changing screenshot options; fullPage is applied only after a browser and page are running.

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

Or skip the browser setup

ScreenshotNeo provides a website screenshot API. A single GET request can return a PNG, JPEG, WebP, or PDF. Its clean-shot workflow accepts cookie or consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses include X-Page-Verdict and X-Billed headers. It also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

For a full-page screenshot of a URL, use the API’s full_page option:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" 
  -d access_key=YOUR_API_KEY 
  --data-urlencode url=https://example.com 
  -d full_page=true 
  -o page.webp

See the ScreenshotNeo API documentation for authentication and supported parameters. The service supports options including element capture by CSS selector, viewport and device presets, retina scale, lazy-image loading for full-page capture, custom CSS or JavaScript, selector waits, delay or network-idle waits, and image format. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Every feature is available on every plan. Try ScreenshotNeo’s website screenshot API and sign up free for 1,000 screenshots a month with no card.

Performance, reliability, and cost

A full-page image has to represent more document area than a viewport image, so page length, image scale, and page behavior affect the work and output size. The official browser documentation establishes the available options and their behavior, not a universal capture-time, maximum height, reliability rate, or file-size figure. Do not assume one timeout or one readiness condition will work for every site. For repeated captures, consider whether you need browser-level control over authentication, interactions, or page state; those needs generally favor automation over a one-off CLI command. When evaluating a hosted service, account for billing rules as well as successful-output pricing: ScreenshotNeo states that failed loads and other listed non-page outcomes are not billed and identifies those outcomes in response headers.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Read next

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.