DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk5 min

How to Capture a Long Page in Puppeteer Without Cutting Off Fixed Headers

Use Puppeteer’s fullPage option for a long document, a clip to omit a header band, or carefully tested CSS to reveal covered content.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a full-document image, start with page.screenshot({ fullPage: true }). If a fixed header hides content you need to read, capture a carefully measured rectangle with clip or temporarily hide the site-specific header with CSS before capturing. Puppeteer’s documentation does not guarantee how fixed or sticky headers are composed in every full-page capture, so test your chosen approach on the target page and installed version.

Choose the capture method for the image you need

Need Puppeteer method Trade-off
The entire rendered document page.screenshot({ fullPage: true }) Convenient full-page capture; the reviewed documentation does not specify fixed or sticky header composition.
A known rectangular region that omits the header band page.screenshot({ clip: { ... } }) Controls the captured region, but you must choose its geometry. It does not move content under a fixed header.
One particular element element.screenshot() Captures the element, not the whole document; Puppeteer scrolls it into view if necessary.
Content visually obscured by a persistent header Temporarily modify the page’s CSS, then capture Page-specific workaround inferred from the screenshot APIs, not an official fixed-header recipe; restore page state afterward.

Capture the full document first

Use fullPage: true when the intended output is the whole rendered document and the page’s normal appearance is acceptable:

await page.screenshot({
  path: 'page.png',
  fullPage: true,
});

The official API defines fullPage as capturing the full page. It does not promise whether a fixed or sticky element will appear once, repeat, or cover content in every configuration. If a header overlaps text in the result, use one of the targeted methods below rather than assuming the full-page option changes the site’s layout.

Exclude the header area with a clip

For a bounded image that should leave out the top header band, set the capture rectangle explicitly:

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.

await page.screenshot({
  path: 'content.png',
  clip: { x: 0, y: 80, width: 1280, height: 900 },
});

Replace the sample coordinates and dimensions with measurements that fit the page and desired output. A clip specifies the region to capture; it does not reposition content beneath a fixed header. When a clip is supplied, captureBeyondViewport defaults to true in the documented options.

Hide a fixed header when you need the content beneath it

If the image must show content that the header visually covers, a practical option is to inject page CSS before capture. This is an implementation inference from Puppeteer’s documented screenshot and page APIs, not a documented fixed-header guarantee. Adapt the selector to the target site:

#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 headerSelector = 'header';

await page.addStyleTag({
  content: `${headerSelector} { visibility: hidden !important; }`,
});

await page.screenshot({ path: 'page.png', fullPage: true });

visibility: hidden hides the header visually but may leave its layout space in place. display: none removes the element from layout, which can shift content; choose based on the intended image rather than applying either rule blindly. A broad header selector may affect more than the fixed navigation, so prefer a site-specific selector when possible.

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

If you will reuse the page, remove the injected style or reload the page after capture. Use cleanup that runs even when capture fails:

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
const headerSelector = 'header';
let style;

try {
  style = await page.addStyleTag({
    content: `${headerSelector} { visibility: hidden !important; }`,
  });
  await page.screenshot({ path: 'page.png', fullPage: true });
} finally {
  if (style) {
    await style.evaluate(element => element.remove());
  }
}

This pattern attempts to restore the page by removing the injected style. Validate the selector and resulting layout against the actual page.

Capture a particular element instead of the document

When only the article body or another specific component is needed, wait for it and capture its element:

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.
const element = await page.waitForSelector('.article-content');
if (!element) throw new Error('Article content was not found');
await element.screenshot({ path: 'article.png' });

The element screenshot method scrolls the selected element into view if necessary and delegates to page screenshot capture. Use it for focused output, not as a substitute for capturing an entire long document.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

Check Puppeteer version and screenshot output

The documentation identified in this guide is for Puppeteer 25.12.0 at the time it was reviewed. Screenshot behavior has changed historically, including fixes involving full-page viewport reset and changes to clip handling. If results differ from an older example, check the changelog and validate against the Puppeteer version installed in your project.

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

Page.screenshot() returns a Uint8Array by default, or a base64 string when the encoding option requests it. The API reference also notes that certain page lifecycle operations in a BrowserContext wait for screenshots to finish to avoid interference.

Troubleshooting

  • The header still covers text in a full-page image: Full-page capture alone does not document a fixed-header composition guarantee. Try a clip that excludes the header band or inject page-specific CSS and verify the result.
  • The clipped image starts at the wrong place: Adjust x, y, width, and height to the target page and desired region. Clipping changes what is captured, not where page content is laid out.
  • Hiding the header leaves a blank band: That can happen because visibility: hidden preserves layout space. Test whether removing the header from layout is appropriate; display: none may shift content.
  • The page looks different after capture: Remove the injected style or reload the page. A try/finally cleanup protects the page from being left modified when capture throws.
  • An element screenshot does not include the whole article: Element capture is for the selected element. Use fullPage: true for the document, or select the exact container whose screenshot you need.
  • A recipe behaves differently after upgrading: Compare it with the documentation and changelog for your installed Puppeteer version; screenshot and clipping behavior has had historical changes.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo can return a website screenshot through one GET request. Its clean-shot steps accept cookie or consent banners like a visitor and remove 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 identifies the page verdict and billing status in headers. It also provides an MCP server for AI agents, with screenshot, page-info, and PDF-capture tools.

Example cURL request (replace the target URL with your page):

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

Frequently Asked Questions

Does Puppeteer guarantee that a fixed header will be captured only once in a full-page screenshot?

No fixed- or sticky-header composition guarantee is stated in the reviewed screenshot documentation. Test the target page and installed Puppeteer version.

Does `clip` move page content below the header?

No. It defines the region in the image; it does not alter page layout or reposition content.

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
Crashes, No Sound, or Screen Glitches?Free driver scan
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.