October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

How to Capture a Full-Page Screenshot in Headless Chrome with a Fixed Viewport

Set a Puppeteer viewport before navigation, then use fullPage: true for a full-page screenshot. Learn when Chrome CLI is sufficient and how to handle dynamic pages.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Puppeteer to control the page viewport and request a full-page capture separately: set the viewport before navigation, then call page.screenshot({ path: 'full.png', fullPage: true }). The viewport determines how the page is laid out; fullPage: true asks Puppeteer to capture the page beyond the viewport height.

Capture a full page at a fixed viewport with Puppeteer

Install Puppeteer in a Node.js project, then use this script. Replace the target URL and viewport dimensions with the values you need.

As an Amazon Associate I earn from qualifying purchases.

import puppeteer from 'puppeteer';

const browser = await puppeteer.launch({ headless: true });
try {
  const page = await browser.newPage();
  await page.setViewport({
    width: 1280,
    height: 800,
    deviceScaleFactor: 1,
  });
  await page.goto('https://example.com', { waitUntil: 'networkidle2' });
  await page.screenshot({ path: 'full.png', fullPage: true });
} finally {
  await browser.close();
}
  1. Create a browser page and set its viewport before navigating. Puppeteer recommends this order because websites may respond to viewport changes; some changes to mobile or touch-related properties can also cause a reload.
  2. Navigate to the page and select a readiness condition suitable for that site. networkidle2 is shown in Puppeteer’s screenshot guide, but it is not a universal signal that all page-specific content is ready.
  3. Capture with fullPage: true. Puppeteer saves the image to full.png; it infers the screenshot type from the filename extension.
  4. Close the browser in finally so it is shut down even if navigation or capture fails.

The viewport’s width and height control rendering dimensions. Full-page capture can produce an image taller than the viewport while retaining the chosen viewport width and layout. Puppeteer’s API documentation identified version 25.12.0 in results accessed October 3, 2026; check the API for the version installed in your project if behavior differs.

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

Why viewport size and full-page capture are separate

A viewport is the browser’s visible layout area. Setting it to 1280 by 800 pixels, for example, tells the page how wide and tall that area is while it renders. The full-page option concerns the capture extent: Puppeteer documents fullPage as taking a screenshot of the full page. A tall output therefore does not require using the entire document height as the viewport height.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • 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

Set the viewport before goto() to avoid resizing after the site has already responded to its initial dimensions. This matters particularly for responsive pages, where changing width can change the layout.

Choosing a wait condition and preparing the page

The capture is only as complete as the page state at the moment it is taken. Chrome’s command-line --timeout caps how long it waits before capture, even if loading is unfinished. Puppeteer’s screenshot example uses networkidle2, but pages with ongoing network requests may not reach that condition as expected, and a quiet network does not guarantee that a particular application element is ready.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • 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
  • For a conventional page, begin with a navigation wait condition appropriate to its behavior, such as Puppeteer’s documented networkidle2 example.
  • For a page that renders content after navigation, wait for the relevant selector or application state before taking the screenshot.
  • For lazy-loaded images, sticky headers, or animation, inspect the output on the target page. These behaviors may need page-specific preparation; they are not guaranteed to be handled identically on every site.
  • If the page continuously makes requests, prefer an explicit condition tied to the content you need rather than assuming network idle is the right signal.

When Chrome’s command line is enough

For a quick screenshot at a selected window size, Chrome documents this command:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
chrome --headless --screenshot --window-size=412,892 https://example.com

Chrome saves screenshot.png in the current working directory. The official CLI reference documents --screenshot and --window-size, but does not describe a dedicated full-page option. Use Puppeteer’s documented fullPage: true when the requirement is explicitly to capture the full page with a controlled viewport.

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.
Approach Full-page support documented Viewport control Best suited to
Chrome CLI with --screenshot --window-size The CLI reference documents screenshots and window sizing, not a dedicated full-page option. Window dimensions via --window-size. A simple capture with minimal code.
Puppeteer with page.screenshot({ fullPage: true }) Yes; the API defines fullPage as capturing the full page. Explicit per-page viewport through page.setViewport(). Scripted full-page captures with controlled rendering and wait logic.

Sources: Chrome Headless command-line reference, Puppeteer setViewport() API, and Puppeteer screenshot API.

Or skip the browser setup

ScreenshotNeo provides a screenshot API and MCP server. A single GET request can return an image or PDF; for a WebP screenshot of a URL:

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor | 100Hz, Game Mode, Advanced Eye Comfort, HDMI and D-sub Ports (LS27D366GANXZA)
  • 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
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. Cookie banners are accepted like a visitor and more than 60 known consent platforms, newsletter popups, and chat widgets are removed before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, with verdict and billing information in response headers. An MCP server lets AI agents use screenshot tools, and the free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000.

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

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

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

Troubleshooting

The screenshot has the right width but is not full height

Confirm that you are using Puppeteer and passing fullPage: true to page.screenshot(). A CLI capture using --window-size sets a window size; the Chrome CLI reference does not document that flag combination as a full-page capture.

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 page has the wrong responsive layout

Set the viewport before calling page.goto(). If you change viewport or mobile-related settings later, the page may respond to the change, and Puppeteer notes that some changes can trigger a reload.

Images or dynamic content are missing

Do not assume navigation completion means all content you care about is present. Wait for the target selector or application-specific readiness condition, then inspect the screenshot. Lazy-loaded content may require page-specific preparation.

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

Navigation hangs or never becomes idle

Continuous network activity can make a network-idle condition unsuitable. Choose a wait condition based on the target page, such as waiting for the content selector you need, rather than relying on a single timing rule for every site.

The Chrome CLI captures before the page is ready

The CLI’s --timeout is a maximum wait before capture, including when loading has not finished. Adjust the wait for the page’s behavior or use Puppeteer when you need script-controlled readiness logic.

The script leaves Chrome running after an error

Keep browser shutdown in a finally block, as in the example, so it runs whether navigation and capture succeed or throw an error.

Performance and reliability considerations

Full-page captures can be substantially taller than the viewport, so the resulting image can be larger than a viewport-sized screenshot. Choose only the viewport dimensions the page needs, and check the output for the actual URL rather than assuming every site handles lazy loading, sticky elements, or animation the same way. The official APIs cited here define the capture and viewport controls, but do not provide a universal performance estimate or guarantee for every page.

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

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.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.