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×
FREEDOM251

Freedom251 › Blog › browser automation

Playwright Screenshot Cuts Off the Right Side of a Wide Web Page: Fixes

By Freedom251 Team · · 4 min read

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

If a Playwright screenshot is missing the right side of a page, check the CSS viewport width before changing screenshot options. fullPage: true captures the full scrollable page vertically; it does not widen the viewport. Compare window.innerWidth with document.documentElement.scrollWidth, then choose a viewport or layout fix that preserves the content you need.

Why does a Playwright screenshot cut off the right side?

A normal page screenshot captures the current viewport. If the page’s rendered content is wider than that viewport, some content may lie outside the captured area. Playwright’s fullPage option changes the capture to include the full scrollable page height; it is not a setting for capturing the full horizontal width. The Playwright screenshot API documents these capture options at page.screenshot.

As an Amazon Associate I earn from qualifying purchases.

The cause depends on the page and your setup. It could be an intentionally wide element, such as a table, or a layout that has not adopted the width you expected. Without the page, viewport configuration, browser/version, and screenshot options, there is no reliable way to identify a particular project’s root cause.

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

How do I check whether the page is wider than the viewport?

Measure the browser’s CSS viewport and the document’s scroll width after the page has rendered. The comparison is a diagnostic technique, not a Playwright guarantee about the cause of any overflow.

#1 Best Overall
Sale
SAMSUNG 34" ViewFinity S50GC Series Ultra-WQHD Monitor, 100Hz, 5ms, HDR10, AMD FreeSync, Eye Care, Borderless Design, PIP, PBP, LS34C502GANXZA, 2023, Black
  • DO MORE ON ONE SCREEN: See every detail on the wider display featuring a 21:9 aspect ratio; Ultra WQHD provides the simplest way to maximize screen real estate and experience truly seamless multitasking on just one screen.Brightness (Typical) : 300 cd/㎡. Static Contrast Ratio 3000:1.
  • ENJOY A BILLION COLORS W/ INCREDIBLE DEPTH: With HDR10 that displays over 1 billion colors compared to 16.7 million for typical SDR technology, dark colors are darker and the brightest are even brighter; Content is experienced as the creator intended
  • CARE FOR YOUR EYES DAY and NIGHT: An ambient light sensor on the monitor detects lighting in your workstation and automatically adjusts brightness; Eye Saver Mode minimizes excessive blue light, and Flicker Free relieves eye strain
  • SEE CONTENT SMOOTHER, EVEN GAMING: A faster than average refresh rate updates the image on screen more often every second; 100Hz refresh rate reduces lag and motion blur when playing games, watching videos, or working on design projects
  • STAY IN SYNC WITH THE ACTION: AMD Radeon FreeSync keeps the refresh rate of your monitor and graphics card in sync to reduce image tearing for a superfluid entertainment experience; Watch movies and play games without interruptions
const dimensions = await page.evaluate(() => ({
  innerWidth: window.innerWidth,
  documentWidth: document.documentElement.scrollWidth,
  bodyWidth: document.body.scrollWidth,
}));
console.log(dimensions);

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

If documentWidth exceeds innerWidth, inspect the element extending past the viewport. Decide whether that extra width is intentional and should be captured, or whether a layout rule needs correction. Avoid applying overflow: hidden merely to make the screenshot look contained if the purpose is to preserve the missing content.

How do I capture the full width of a page with Playwright?

Set the CSS viewport before the page lays out

If you want a wide desktop layout, configure a viewport wide enough for that layout before navigation or capture, then verify that the page actually renders as intended. The viewport controls layout in CSS pixels. Increasing raster output scale does not make the page lay out at a wider CSS width.

Rank #2
Sale
Dell 34 Monitor S3425DW, WQHD VA, 120Hz, FreeSync Premium, Eye Comfort
  • Improved ComfortView Plus: Reduces harmful blue light emissions to ≤35%, for all-day comfort without sacrificing color accuracy.
  • Refresh rate: A smooth, tear-free experience with AMD FreeSync Premium (refresh rate up to 120Hz) and an ultra-low 0.03ms response time create a captivating experience for work and play.
  • Vivid colors: Enjoy vibrant, true-to-life colors with 99% sRGB and 95% DCI-P3 coverage. The VA panel with 3000:1 contrast ratio and HDR readiness delivers stunning depth, detail and realism.
  • Re-engineered sound quality: Enjoy more detailed sound with spacious audio featuring greater output power, deeper frequency response and more decibel range than the previous generation.
  • Easy connectivity: Keep your desk organized and clutter-free with a single USB-C cable (up to 65W power delivery).

Playwright’s screenshot documentation describes scale: 'css' as one image pixel per CSS pixel and scale: 'device' as one image pixel per device pixel. Choose between them for output pixel density, not as a fix for horizontal clipping. See the screenshot API options.

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

Use a clip only for a specific rectangle

The clip option captures a rectangle defined by x, y, width, and height. Check that the rectangle’s right boundary reaches the content you want to keep. A clip selects an area; it does not make off-viewport content render. The API reference documents the clip geometry.

Rank #3
Sceptre 34-inch Curved ultrawide WQHD Monitor (3440 × 1440), R1500, up to 180Hz/165Hz, DisplayPort x2, 99% sRGB, 1ms, Built-in Speakers, Machine Black, 2025 (C345B-QUT168)
  • 1ms MPRT: Colors fade and illuminate instantly with a 1ms response time, eliminating ghosting and piecing together precise imagery during action-packed scenes and gaming.
  • Luminous Backcover Lights: A colorful LED light illuminates the back cover of the monitor, delivering a uniquely modern design.
  • WQHD Resolution: At 5 million pixels, Wide Quad HD Resolution (3440 x 1440) display resolution provides you with the next level of refined, and detailed picture over the current 1080P standard.
  • 21:9 Ultrawide: See more and do more with an ultrawide monitor. 21:9 provides you with 30% more screen space versus the conventional monitor. With an ultrawide resolution of 3440 x 1440, expand your performance and productivity.

Choose the capture option that matches the goal

Need Use What it changes
Capture only what is currently visible Default page screenshot Captures the viewport; content outside it is not brought into view by this option.
Capture the page’s full vertical scroll extent fullPage: true Extends the capture vertically; it does not set a wider viewport.
Render a wider desktop layout Set an appropriate viewport width before layout Changes the CSS layout viewport. Check the resulting page dimensions and layout.
Capture a known subregion clip with the required rectangle Selects coordinates and dimensions; it does not render off-viewport content.
Change raster output density scale: 'css' or scale: 'device' Changes pixels per CSS pixel, not the CSS viewport width.

What if only full-page screenshots are too narrow?

If the viewport screenshot looks right but the full-page result changes or clips content, check whether the page uses viewport-relative CSS such as vh or vw, and compare the output across the browser engine and installed Playwright version you actually use. A historical Chromium issue discussed vh/vw behavior in full-page screenshots, and a historical WebKit issue reported full-page snapshot failures on some sites. These reports are reasons to test a reproducible case, not evidence of a current, universal browser defect: Chromium issue #757 and WebKit issue #16727.

For official examples of full-page and buffer screenshots, see Playwright’s Screenshots guide.

Rank #4
Alienware 34 Curved Gaming Monitor – AW3425DWM - 34-inch WQHD 180Hz 1ms Display, 1500R, AMD FreeSync Premium, VESA AdaptiveSync.
  • Bring virtual worlds to life with WQHD quality: Explore your games' vast, detailed landscapes with WQHD resolution and fluid, responsive visuals in an iconically designed ultrawide gaming monitor.
  • Dive into expansive details: Whether you’re exploring open worlds or completing challenges, you’ll never miss a detail thanks to WQHD resolution and a 34” ultrawide panel with a 1500R curve.
  • Fluid Performance: Get in the game with a smooth 180Hz refresh rate, 1ms gray to gray response time, AMD FreeSync Premium and VESA Adaptive Sync Technology.
  • Sharp visuals: Enjoy vibrant colors with DCI-P3 95% color coverage and VESA DisplayHDR 400 certification.
  • Game longer: Lock in for marathon gaming sessions with a dedicated console mode and hardware-based low blue light solution that reduces eye strain while preserving color.
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 screenshot from one GET request. Its clean-shot steps accept cookie/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/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and each response includes X-Page-Verdict and X-Billed headers. It also has an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents.

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

For a full-page image, set full_page=true and choose the desired viewport width; these settings address different things, just as they do in browser-based capture. ScreenshotNeo’s parameter names used by other screenshot APIs also work, which can make switching easier. See the ScreenshotNeo API documentation for the available parameters.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo offers 1,000 screenshots a month free with no card; paid plans start at $5 for 3,000. Learn about ScreenshotNeo or sign up for the free plan.

Best Value
Sale
SANSUI 34-Inch Curved Gaming Monitor UWQHD 3440 x 1440P 200Hz Ultrawide | 34” Ultra Wide Gaming Computer Monitor-PBP, OD 1ms, HDR, 300nits, 130%sRGB, DCI-P3 97%,AI Crosshair,HDMI2.1x2,DP1.4
  • 34 inch Curved 1500R UWQHD(3440 x 1440) @ 200Hz Fast VA Ultrawide Gaming Monitor with AI built-in.
  • Performance: Up to 200Hz Refresh Rate | OD 1ms Response Time丨 FastVA | AI Blue light reduction | AI Crosshair | AI PQ | AdaptiveSync | Support VRR with HDMI2.1
  • Ergonomic Stand: Tilt / Kensington Lock: -5°~15°(+/-2°) / Yes丨VESA Compatible (100 x 100mm) | 178° Wide Viewing Angle | PBP, 21:9 Ultrawide
  • Input &Output: DP 1.4 (Up to 200)|HDMI2.1 X 2 (Up to 200)|Earphone |No speakers
  • Warranty: SANSUI 34-inch Curved gaming computer monitor support money-back and free replacement warranty from order date within 30 days and lifetime technical support.

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.

browser automationPlaywrightscreenshotsWeb development

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

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.