Set the page’s viewport before navigating, then save the capture with page.screenshot(). This runnable Node.js example produces a 1280 × 720 PNG:
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.setViewport({ width: 1280, height: 720, deviceScaleFactor: 1 });
await page.goto('https://example.com');
await page.screenshot({ path: 'screenshot.png' });
} finally {
await browser.close();
}
})();
Set the viewport before opening the page
page.setViewport() controls the page’s viewport width and height. Set it before page.goto() so the site loads at the dimensions you want; changing viewport settings after navigation can cause unexpected responsive behavior. Puppeteer also notes that changing mobile or touch settings can reload a page in some cases. See the Page.setViewport() API.
As an Amazon Associate I earn from qualifying purchases.
- Create a browser page with
browser.newPage(). - Set the desired dimensions with
await page.setViewport({ width, height }). - Navigate to the target URL.
- Capture with
await page.screenshot({ path: 'screenshot.png' }).
Use integer pixel dimensions for width and height. Add deviceScaleFactor to set the device pixel ratio; the example uses 1. Puppeteer documents an 800 × 600 default viewport when configured through its connection options, but an explicit viewport avoids relying on that default. See ConnectOptions.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallChoose the capture area
By default, a screenshot captures the current viewport. For a full-document image, set fullPage: true. To capture only a specific rectangle, use the clip option. These choices affect the image extent, not the viewport dimensions set with setViewport().
#1 Best Overall
- 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
// Capture the viewport (default behavior)
await page.screenshot({ path: 'viewport.png' });
// Capture the full page
await page.screenshot({ path: 'full-page.png', fullPage: true });
// Capture a rectangular region
await page.screenshot({
path: 'region.png',
clip: { x: 100, y: 80, width: 500, height: 300 }
});
Consult Puppeteer’s ScreenshotOptions for the available options, including path, type, clip, fullPage, omitBackground and quality. The output type is inferred from the filename extension; PNG is the default when no type is specified. If you omit path, Puppeteer does not write the image to disk. The Puppeteer screenshots guide shows the basic capture workflow.
Common problems and fixes
- The page looks like a mobile or desktop layout you did not expect: Set the viewport before navigation and confirm both width and height are in pixels.
- The image has the wrong dimensions: Check the viewport object and ensure you have not enabled
fullPageor supplied acliprectangle when you intended a viewport capture. - No file appears: Include a
pathin the screenshot options. Without one, Puppeteer does not save the image to disk. - The page changes or reloads when viewport settings change: Set the viewport once before navigation. Puppeteer documents possible reloads in some cases when changing
isMobileorhasTouch.
Or skip the browser setup
For a hosted capture, ScreenshotNeo takes a screenshot with one GET request. This example saves a WebP image; replace the URL with the page you want to capture. See the ScreenshotNeo API documentation for options.
Rank #2
- 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
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
ScreenshotNeo removes cookie and consent banners, newsletter popups and chat widgets before capture; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads and cache hits cost nothing, and response headers report the page verdict and whether the request was billed. Its MCP server provides screenshot tools for AI agents. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. All features are available on every plan. Learn more at ScreenshotNeo.
Sign up for 1,000 free screenshots a month, with no card required.
Quick Recap
Best Value
- 【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.
Rank #4
- 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
Rank #3
- 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.
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.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.




