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 desk6 min

Fix Puppeteer Screenshots That Cut Off Sticky Headers on Long Pages

A practical guide to diagnosing clipped, misplaced, or repeated sticky headers in Puppeteer by choosing the right screenshot mode, checking viewport and clip settings, and testing CSS changes safely.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

First choose the screenshot you need: use page.screenshot({ fullPage: true }) for one image of the full document, a normal screenshot for the browser viewport, or clip for an intentional region. These modes are not interchangeable, and none is a universal sticky-header fix. If the header is misplaced, clipped, or repeated, reproduce the issue with explicit viewport dimensions and the exact Puppeteer and Chromium versions before changing CSS.

Choose the capture mode before changing the header

A sticky header is positioned in relation to scrolling and the viewport. That can make its appearance differ between a screenshot of the visible browser window, a full-page capture, and a stitched set of viewport images. Start by identifying the artifact you actually want:

  • One tall image of the document: use fullPage: true. This requests a full-page screenshot; it does not mean the header should be repeated at each scroll position.
  • A faithful view of what a user sees: take a viewport screenshot at the intended viewport size and scroll position, leaving the page’s sticky behavior intact.
  • A particular region: use clip deliberately, and check that the rectangle matches the intended area.
  • A sequence of scrolling states: capture viewport-sized frames and stitch them only if needed. Fixed or sticky elements can recur across frames.

Puppeteer documents fullPage, clip, and captureBeyondViewport as separate screenshot options. In the API documentation displayed as version 25.12.0 at research time, fullPage defaults to false. captureBeyondViewport defaults to false when no clip is supplied and true when a clip is supplied. See the ScreenshotOptions API.

Make the failure reproducible

Record the browser and capture settings

Before testing fixes, log the Puppeteer package version, the browser version, headless mode, viewport width and height, device scale factor, and the complete screenshot options object. Record whether the call includes clip or fullPage. Version context matters: the issues discussed below concern Puppeteer v2.0.0 and a separate v8.0.0 report, not proof of a current defect.

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

As an Amazon Associate I earn from qualifying purchases.

Reduce the page to a controlled case

  1. Use a long page with a single sticky header and a known viewport size.
  2. Set the viewport explicitly before navigating, so responsive layout is repeatable.
  3. Capture once with the default viewport screenshot, once with fullPage: true, and once with the production clip if your code uses one.
  4. Keep other options fixed and compare output dimensions and the header’s position in each image.
  5. Inspect the top, middle, and bottom for clipping, duplicate headers, layout shifts, and missing content.

Wait until the page layout and content have settled before capture. If the screenshot is unexpectedly small or the page appears to resize, check for responsive breakpoints, lazy-loaded content, animations, and application code that changes layout near capture time.

Use a capture method that matches the intended result

For a full document image

Try a simple full-page capture first, without a clip:

#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
const screenshot = await page.screenshot({ fullPage: true });

If the static image should show the header only once and the page’s sticky positioning causes an unwanted result, test a temporary capture-only style that changes the header from sticky or fixed to normal document flow. This is a troubleshooting strategy, not a guaranteed Puppeteer workaround. Preserve and restore the original styles, and verify that the change does not affect other layout elements.

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

For a faithful viewport image

Keep the page CSS intact and capture the browser viewport at the intended scroll position. If you need several scroll positions, capture separate viewport frames. Expect sticky and fixed elements to appear in more than one frame unless your stitching process handles them specifically.

For an intentional crop

Use clip only when you want a defined rectangle. Verify the clip’s coordinates and dimensions against the viewport and inspect the result. Because captureBeyondViewport defaults differently depending on whether a clip is present, set it explicitly when the default is not the behavior you want.

For one element rather than a page

ElementHandle.screenshot() is useful when the target is a particular element. Puppeteer’s screenshot guide says it tries to scroll an element into view if it is hidden; it does not establish that this is a substitute for capturing an arbitrarily tall document with Page.screenshot({ fullPage: true }). See the Puppeteer screenshots guide.

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

Why viewport resizing and old workarounds can backfire

A maintainer discussion about Puppeteer v2.0.0 describes a Chromium change that clipped page.screenshot to the viewport. The discussion says this made document and overflow-scroll clipping more consistent and fixed certain fixed-position headers or cookie banners that had previously appeared mid-screenshot. Resizing the viewport was suggested for scripts that depended on earlier behavior, but it is historical context, not a universal instruction for current releases. Read the v2.0.0 screenshot behavior discussion.

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

Enlarging the viewport can change what you are trying to capture: responsive breakpoints may switch, vh-based sections may change height, and sticky or fixed elements may move. Choose viewport dimensions deliberately and compare the resulting layout to the target rather than treating a larger viewport as a neutral fix.

A separate issue opened in 2021 reports one user’s Puppeteer 8.0.0 screenshot sometimes becoming small or resizing after a custom default viewport and device scale factor of 2. It is a single historical report, not evidence that current Puppeteer generally has that bug. See the v8.0.0 report.

Troubleshooting by symptom

Symptom What to check Next step
Header is cut off in a cropped image Whether the call supplies clip, its rectangle, viewport dimensions, and captureBeyondViewport. Remove the clip for a comparison; if the crop is intentional, correct its bounds and explicitly set beyond-viewport behavior if needed.
Header appears in an unexpected position in a tall image Whether the output is full-page or a sequence of viewport frames, and whether the header is sticky or fixed. For one static image, test capture-only normal-flow styling. For a faithful browser view, capture viewport frames without changing the CSS.
Header appears more than once Whether frames are being stitched and the header remains fixed or sticky during each capture. Use a full-page capture if it meets the goal, or make the stitching process account for repeated elements. Do not assume stitching reproduces one continuous browser state.
Screenshot size or layout changes between runs Puppeteer and browser versions, viewport setup timing, device scale factor, page scripts, animations, lazy content, and responsive or vh-based CSS. Set viewport before navigation, wait for layout to settle, and reproduce with fixed options. Treat the v8 report as a clue to investigate, not a diagnosis.
Element screenshot omits the rest of the page Whether the code uses an element handle rather than a page screenshot. Use page.screenshot({ fullPage: true }) for a full-document image; use an element screenshot only for the target element.

Or skip the browser setup

ScreenshotNeo takes website screenshots through a single API request. Its capture options include full-page screenshots and element selection, and it accepts common screenshot API parameter names to make switching easier. Cookie banners, newsletter popups, and chat widgets are removed before capture; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. An MCP server offers take_screenshot, get_page_info, and capture_pdf tools for AI agents and other MCP clients.

Example cURL request (replace the URL with the page you need):

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
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.
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 setup and options. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo free.

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

Frequently Asked Questions

Does fullPage: true repeat a sticky header at each scroll position?

No. It requests a full-page screenshot, not a stitched set of viewport scroll states.

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

Can an element screenshot replace a full-page screenshot?

Not as a general rule. Use Page.screenshot({ fullPage: true }) when the required output is the full document.

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.

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.

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

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
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

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.