For a basic headless screenshot, run Chrome with --headless --screenshot. That captures the requested browser dimensions, not necessarily the entire page. To capture content beyond the viewport as an image, use a Chrome DevTools Protocol (CDP) client and set captureBeyondViewport: true on Page.captureScreenshot. If a document is acceptable instead of an image, Chrome’s --print-to-pdf option is simpler.
Choose the output you need
| Need | Command-line method | What it produces |
|---|---|---|
| A quick screenshot at chosen dimensions | --headless --screenshot --window-size=... |
An image at the requested dimensions; not a guaranteed capture of the whole document. |
| An image extending beyond the viewport | CDP Page.captureScreenshot with captureBeyondViewport: true |
Base64-encoded image data that your client must decode and save. |
| A printable page | --headless --print-to-pdf |
A PDF, not an image. |
Chrome’s Headless CLI documentation documents the screenshot and PDF flags. The CDP protocol reference describes beyond-viewport capture. Chrome and CDP behavior can vary by version, so check the documentation against the Chrome release installed on your machine.
As an Amazon Associate I earn from qualifying purchases.
Capture a basic headless screenshot
Run this in a terminal where the Chrome executable is available:
chrome --headless --screenshot --window-size=1280,900 https://example.com/
Chrome saves screenshot.png in the current working directory. The --window-size values request the screenshot dimensions. This is useful for a viewport-sized image, but the documented command does not promise that the image includes every part of a long page. Increasing the requested height is not a reliable substitute for a full-document capture.
#1 Best Overall
- SLIM. LIGHTWEIGHT. READY TO GO: The all-new slim design is perfect for busy lives on the go.
- SKILLFULLY DESIGNED. MILITARY TOUGH: Built with premium craftsmanship to withstand the occasional drop or ding.
- ALL-DAY, ALL-IN-ONE CHARGING: Power through your school day – and beyond – with a long-lasting 12-hour battery.¹
- 3X FASTER THAN THE PREVIOUS GENERATION OF WIFI: Crush your schoolwork in record time with Wi-Fi that’s three times faster than the previous generation of Wi-Fi.
- YOUR PHONE AND CHROMEBOOK WORK BETTER TOGETHER: Easily transfer files between devices, and control your phone right from your Chromebook.
Set a wait cap when needed
You can add --timeout=<milliseconds> to limit how long Chrome waits before taking a screenshot or printing to PDF:
chrome --headless --timeout=5000 --screenshot --window-size=1280,900 https://example.com/
The timeout is a maximum wait, not confirmation that a dynamic page has finished loading. Pages that populate content after network activity settles may still be incomplete when the capture occurs.
Capture beyond the viewport with CDP
For a full-page image, the relevant Chrome DevTools Protocol method is Page.captureScreenshot. Set its captureBeyondViewport option to true, then decode the response’s base64 data value and write the decoded bytes to an image file. The protocol supports PNG, JPEG, and WebP formats.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
- FOR HOME, WORK, & SCHOOL – With an Intel processor, 14-inch display, custom-tuned stereo speakers, and long battery life, this Chromebook laptop lets you knock out any assignment or binge-watch your favorite shows..Voltage:5.0 volts
- HD DISPLAY, PORTABLE DESIGN – See every bit of detail on this micro-edge, anti-glare, 14-inch HD (1366 x 768) display (1); easily take this thin and lightweight laptop PC from room to room, on trips, or in a backpack.
- ALL-DAY PERFORMANCE – Reliably tackle all your assignments at once with the quad-core, Intel Celeron N4120—the perfect processor for performance, power consumption, and value (2).
- 4K READY – Smoothly stream 4K content and play your favorite next-gen games with Intel UHD Graphics 600 (3) (4).
- MEMORY AND STORAGE – Enjoy a boost to your system’s performance with 4 GB of RAM while saving more of your favorite memories with 64 GB of reliable flash-based eMMC storage (5).
This is not a single documented Chrome command-line flag. You need a CDP-capable client or script to connect to Chrome, issue the protocol command, receive its response, and save the image. The exact runnable syntax depends on that client; verify its connection and command syntax against the client documentation and the CDP protocol version supported by your installed Chrome.
- Start Chrome in headless mode with remote debugging enabled, following the connection instructions for your CDP client.
- Open the target page through that client and wait for the content you need to appear.
- Send
Page.captureScreenshotwithcaptureBeyondViewport: true; select PNG, JPEG, or WebP if your client exposes the format option. - Decode the returned base64 image data and save the bytes with the matching file extension.
Because the official protocol reference defines the capture option but not a universal shell-client syntax, do not paste a command written for one CDP client into another without adapting its connection, command, and base64-decoding steps.
Save the page as a PDF instead
If you need a printable document rather than an image, use Chrome’s headless print option:
Rank #3
- Storage: 16GB Flash Memory
- OS: Chrome OS
- Screen Size: 11.6"
chrome --headless --print-to-pdf --no-pdf-header-footer https://example.com/
This writes a PDF. The --no-pdf-header-footer flag suppresses the printed header and footer. You can also use --timeout=<milliseconds> as a wait cap, with the same caveat that elapsed time does not establish that dynamic content has loaded.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Troubleshoot common capture problems
- The image shows only the top portion of the page: the basic
--screenshotcommand captures requested dimensions, not a guaranteed full document. Use a CDP client andcaptureBeyondViewport: truefor an image extending beyond the viewport. - No screenshot appears: Chrome saves
screenshot.pngin the current working directory. Check that directory and confirm the command ran with a Chrome executable available in your shell. - The page is missing content that appears later: the timeout flag only caps the wait. Increase the wait or use an automation client that can wait for the relevant page state before capture.
- The CDP call returns data but no usable file: the screenshot response contains base64 data. Decode it to binary before writing the file, and use an extension that matches the requested image format.
- You need a document rather than a very tall image: use
--print-to-pdf; it creates a PDF, which is a different output format from a screenshot.
Or skip the browser setup
ScreenshotNeo provides a screenshot API and MCP server. One GET request can return a screenshot or PDF; its cookie-cleanup steps accept consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture, and each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, with response headers indicating the page verdict and whether the request was billed. Its MCP server offers screenshot tools for AI agents, and its API supports full-page capture.
For example, this cURL request saves a screenshot of the target page:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/ -o shot.webp
See the ScreenshotNeo API documentation for authentication and request options. The API also accepts parameter names used by other screenshot APIs, which can make switching easier. Plans include 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000. Try ScreenshotNeo by signing up for 1,000 free screenshots a month, with no card required.
Rank #4
- Intel Celeron N4120: 4 Cores & Threads, 1.1GHz Base Clock, Up to 2.6GHz Boost Clock, 4MB Cache, Intel UHD Graphics 600. The perfect combination of performance, power consumption, and value helps your device handle multitasking smoothly and reliably with four processing cores to divide up the work.
Frequently Asked Questions
Does Chrome have a documented full-page screenshot flag?
The documented --screenshot option is paired with --window-size; beyond-viewport capture is exposed through CDP’s captureBeyondViewport option.
Can Chrome save the capture as a PDF from the command line?
Yes. Use --headless --print-to-pdf; it creates a PDF rather than an image.
Quick Recap
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.




