Free tools Windows power users keep installed
One-click scans. No signup required.
Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
fromSurface is an optional boolean parameter of the Chrome DevTools Protocol (CDP) command Page.captureScreenshot. It selects whether the screenshot is captured from the surface rather than the view. The current tip-of-tree protocol reference documents true as the default and marks the parameter experimental. If you are investigating a mismatch, compare explicit true and false values in the same setup; Chromium’s tests suggest scrollbar handling is one implementation detail worth checking, but do not establish that toggling the flag always changes scrollbars.
What “surface rather than view” means
In CDP, Page.captureScreenshot captures a page screenshot and returns image data encoded in base64. Its fromSurface parameter chooses the capture source: the protocol describes true as capturing “from the surface, rather than the view.” In practical terms, it is a choice about where Chrome obtains the image, not a setting for the image’s file format, selected region, or compression quality.
The parameter is optional and boolean. The current tip-of-tree CDP Page-domain reference gives it a default of true. The same reference labels it experimental, so treat that description and default as the current protocol documentation, not an immutable guarantee for every Chrome release, platform, or client library.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitches“Surface” and “view” are the protocol’s terms; the reference does not provide a complete cross-platform rendering model or promise a particular visible difference for every page. It is safer to understand the option as a capture-source selector, then use controlled comparisons if the output matters.
#1 Best Overall
How to specify the parameter
When sending Page.captureScreenshot over a CDP connection, include fromSurface in the command’s params object. This is the command payload for an explicit surface capture:
{
"id": 1,
"method": "Page.captureScreenshot",
"params": {
"fromSurface": true
}
}
To request the other mode, change the boolean to false. A CDP client must send this payload through its connection to the relevant browser or page target; the JSON alone is not a complete connection program. The protocol command’s result contains the screenshot image data as base64. A client may decode that data and write it to a file in the format it requested.
Rank #2
If you omit fromSurface, the tip-of-tree reference documents true as the default. For debugging or reproducible scripts, explicitly sending the value you intend makes the capture choice visible in the request. Also check the particular client library’s version and serialization behavior: a protocol default and a generated client’s handling of omitted optional values are not necessarily the same thing.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →What Chromium’s test example tells you—and what it does not
A Chromium browser test constructs screenshot parameters with explicit fromSurface values. In a test comment, the false case is described as capturing “without emulation and without changing preferences, as-is.” The test then compares it with a surface capture, describing the latter as the case “where actual scrollbar magic happened,” and checks internal scrollbar rendering.
This is useful implementation evidence: in that test’s context, the distinction matters to how Chrome exercises scrollbar handling. It is not a general definition that false always disables emulation, nor proof that changing the flag always changes scrollbar appearance. The comments are informal explanations within a Chromium test, not a normative cross-platform promise. The protocol reference’s surface-versus-view description is the general contract to start from.
How to debug a screenshot that looks different
If a capture differs from what you see in a browser, compare the two capture-source values under controlled conditions rather than changing several settings at once.
Rank #4
- Keep the page and capture setup fixed. Use the same target page, viewport, and emulation settings for both captures. Save the two requests or otherwise record their parameters.
- Set
fromSurfaceexplicitly. Capture once withtrueand once withfalse. Compare the resulting images, paying particular attention to scrollbar rendering if that is where the mismatch appears. - Change only this value for the comparison. If viewport, emulation, timing, or other parameters change between captures, the comparison cannot isolate the effect of
fromSurface. - Check the client and Chrome versions. Confirm what your library actually sends and which Chrome/CDP protocol version it targets. The protocol reference is tip-of-tree and experimental for this parameter; a client’s generated types or defaults may differ.
- Keep the result in scope. If the images differ, report the observed result for that page, version, platform, and setup. Do not infer a universal rendering rule from one comparison.
This procedure is a debugging approach informed by Chromium’s specific test; it is not a protocol guarantee that one value will fix a mismatch. If the two images are identical, that does not invalidate the parameter: the source choice may simply not produce a visible difference for that page and environment.
Do not confuse fromSurface with other screenshot options
Page.captureScreenshot has separate parameters for other capture decisions. The current protocol reference documents the following options:
| Parameter | What it controls |
|---|---|
fromSurface |
Whether capture is from the surface rather than the view; the documented default is true. |
format |
Image encoding: JPEG, PNG, or WebP. PNG is the documented default. |
quality |
JPEG compression quality. |
clip |
A selected region to capture. |
captureBeyondViewport |
Whether capture extends beyond the viewport. |
optimizeForSpeed |
A capture-speed optimization option. |
These controls answer different questions. If the wrong region appears, inspect clip or capture extent; if the output encoding is wrong, inspect format; for JPEG compression, inspect quality. Changing those settings does not explain the surface-versus-view choice.
Or skip the browser setup
If your goal is simply to obtain a website screenshot rather than control CDP’s capture source, ScreenshotNeo offers a one-request screenshot API. It is a different workflow: this request does not expose CDP’s fromSurface parameter.
For example, save a WebP screenshot of Stripe with cURL:
Recommended Free Tools
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. Before capture, it accepts the cookie or consent banner as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response indicates the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.
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.

