Chromium Screenshot Cuts Off the Bottom of a Long Webpage: Fix
A Chromium screenshot that ends at the viewport is usually a capture-mode or clipping issue. Check Puppeteer’s full-page option, DevTools clip settings, and page height.
If a Chromium screenshot stops at the bottom of the visible window, first check whether the code asks for a viewport screenshot or a full-page screenshot. In Puppeteer, fullPage defaults to false; set it to true to capture the full page. If it is already enabled, inspect any clip rectangle and, for direct Chrome DevTools Protocol calls, the clip and captureBeyondViewport parameters. A very tall page can also raise image-size constraints, but verify the capture settings before assuming Chromium has a fixed height limit.
1. Set Puppeteer to capture the full page
Use Puppeteer’s fullPage screenshot option:
await page.screenshot({ path: 'page.png', fullPage: true });
The documented default for fullPage is false, which captures the viewport rather than the whole document. Here is a complete runnable example:
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch({ headless: true });
try {
const page = await browser.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle2' });
await page.screenshot({ path: 'page.png', fullPage: true });
} finally {
await browser.close();
}
Replace the URL with the page you need. networkidle2 is a readiness choice, not a guarantee that every application has finished rendering. For a page that renders content after navigation, wait for a known selector or a deliberate delay before taking the screenshot.
2. Check clipping and direct DevTools Protocol options
If fullPage: true does not solve it, review the complete options object passed to page.screenshot(). A clip rectangle explicitly bounds the captured area. Check its x, y, width, and height; a height set to the viewport height will produce a short capture even if the page is longer. Remove the clip when you want the full document, or adjust it when you intentionally need a region.
When calling Chrome DevTools Protocol directly, inspect Page.captureScreenshot. Its parameters include clip and captureBeyondViewport; the protocol reference documents the latter as defaulting to false. Set options to match the intended capture and do not assume a clipped capture automatically expands to the document’s full height. See the Puppeteer screenshot options and the Chrome DevTools Protocol screenshot method.
3. Capture one element instead of the entire document
If you only need a component near the bottom, capture that element rather than producing a very tall page image. Puppeteer’s ElementHandle.screenshot() captures an element and attempts to scroll a hidden element into view by default.
const card = await page.$('[data-report-card]');
if (!card) throw new Error('Report card was not found');
await card.screenshot({ path: 'report-card.png' });
Use an element screenshot when the desired output is one component. Use fullPage: true when the output should contain the whole document.
4. Diagnose the symptom
| What you see | What to check | What to change |
|---|---|---|
| Output ends exactly at the visible window boundary | Whether the request is a viewport capture; Puppeteer’s default is not full-page | Set fullPage: true |
| Output ends at a custom boundary | Any clip rectangle and its height |
Remove the clip for a full-page capture, or correct its dimensions |
| Using raw DevTools Protocol | Page.captureScreenshot parameters |
Review clip and captureBeyondViewport |
| Only one lower-page component is needed | Whether the target element exists and is visible | Use ElementHandle.screenshot() |
| Page is exceptionally tall | Actual output dimensions, browser and library versions, and whether the result is blank or truncated | Test a smaller section or element and investigate image-size constraints separately |
5. Still clipped? Use this checklist
- Log or inspect the final screenshot options object immediately before the call. Confirm
fullPageis true and identify anyclip. - Check that the call is made on the expected page and that the navigation reached the intended URL.
- Wait for the page content you expect to appear. Lazy-loaded images and client-rendered sections may not exist until scrolling or application-specific loading completes.
- Record the output’s pixel dimensions. If it ends at a boundary, distinguish a requested crop from a limit encountered while producing a very tall image.
- Try an element screenshot or smaller page section to determine whether the problem is limited to the full-document output.
- Record the Puppeteer and Chromium versions before comparing behavior across environments. Screenshot semantics can change between versions.
A Puppeteer issue opened in 2017 reported a 16,384-pixel maximum height in the reporter’s tested cases, with some very tall captures producing white output. That is a historical, version-specific report, not a universal limit for current Chromium. Do not treat 16,384 pixels as a guaranteed current cap; check your actual versions and output. The old report is available in Puppeteer issue #359.
6. Troubleshooting common failures
| Error or result | Likely cause | Fix |
|---|---|---|
| Screenshot is only the viewport | fullPage omitted or false |
Set fullPage: true and confirm no other wrapper resets the option |
| Screenshot is limited to a rectangle | A clip was supplied |
Remove the clip for a full-document capture or correct its coordinates and dimensions |
| Protocol capture does not include content beyond the viewport | captureBeyondViewport is left at its documented default |
Inspect the protocol request and configure it for the intended capture |
| Bottom section is missing even in a full-page image | Content may be rendered or loaded only after scrolling or a later application event | Wait for the relevant selector or trigger the page’s expected loading behavior before capture |
| Very tall output is blank, truncated, or fails | Possible image-size constraints or version-specific behavior | Capture smaller sections or the required element; verify current browser and Puppeteer versions rather than relying on a historical limit |
7. Performance, reliability, and output size
A full-page image contains more pixels than a viewport capture, so it can take longer to produce and consume more memory and storage. Large pages also make debugging less clear: a blank or truncated output may be related to image dimensions, while a crop boundary usually points back to the requested options. Start with the smallest capture that meets the need. For one component, capture the element. For the whole document, use full-page mode and check the resulting dimensions.
For repeatable captures, wait for a page-specific readiness condition, use the same browser and library versions across runs, and inspect both the screenshot options and output dimensions when results differ. Network-idle waits alone may not cover delayed or interaction-triggered content.
8. Or skip the browser setup
ScreenshotNeo provides a website screenshot API and MCP server. One GET request returns an image or PDF. 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. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. See the ScreenshotNeo website and API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
timeout=90,
)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await Bun.write('shot.webp', res);
Sign up for 1,000 free screenshots a month, with no card required.
9. FAQ
Does fullPage: true change the browser viewport?
It requests a full-page screenshot. Check the resulting image dimensions if you need to verify what was captured.
Should I always enable captureBeyondViewport?
No. Use settings that match the capture you want. For direct protocol usage, inspect that parameter along with any clip rather than changing it without checking the request.
Is 16,384 pixels the current Chromium screenshot limit?
The cited figure comes from a 2017 issue report about specific tests. It does not establish a universal current limit.


