Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk4 min

How to Capture a Full-Page Screenshot at a Specific Viewport Width

Set the viewport before navigation to preserve the responsive layout you want, then use the framework’s full-page screenshot option.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set the browser’s viewport width before you open the page, then capture it with the browser automation tool’s full-page option. In Playwright, use page.setViewportSize({ width, height }) before page.goto(), followed by page.screenshot({ fullPage: true }). The viewport width controls the responsive layout; the full-page option captures the scrollable document.

Capture the page at a chosen width with Playwright

Use a practical viewport height as well as the width. The width is measured in CSS pixels and determines how the page lays out at responsive breakpoints. Set it before navigation: many sites do not expect a phone-sized viewport to be applied after the page has already loaded. See the Playwright Page API and Playwright Screenshots documentation.

As an Amazon Associate I earn from qualifying purchases.

const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch();
  try {
    const page = await browser.newPage();
    await page.setViewportSize({ width: 1280, height: 800 });
    await page.goto('https://example.com', { waitUntil: 'networkidle' });
    await page.screenshot({ path: 'full-page.png', fullPage: true });
  } finally {
    await browser.close();
  }
})();

Install Playwright and its browser if they are not already in the project: npm install playwright, then npx playwright install chromium. Replace the example URL and dimensions with the page and CSS-pixel viewport you need. The code uses Playwright’s documented viewport and full-page controls; the chosen wait condition is a practical option, not a guarantee that every site’s dynamic content has finished loading.

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

Set the viewport on the browser context instead

If several pages should share the same dimensions, create a browser context with viewport options and open pages from that context. This keeps the viewport configuration at context level rather than repeating setViewportSize on each page.

#1 Best Overall
Sale
Epson Workforce ES-50 Compact & Lightweight Mobile Document Scanner
  • PORTABLE SCANNER FOR USE ON-THE-GO — The fastest and lightest mobile single-sheet-fed compact document scanner in its class¹
  • QUICK DOCUMENT SCANNING ― This Epson ultra-fast scanner scans a single page as quickly as 5.5 seconds²; Windows and Mac compatible
  • VERSATILE PAPER HANDLING ― Portable scanner scans documents up to 8.5 x 72 in; Also easily digitizes receipts and ID cards to make accounting, bookkeeping, and organizing simpler
  • INTUITIVE, HIGH-SPEED SOFTWARE — Epson ScanSmart Software³ is a smart tool allowing you to easily scan, review, and save; Stay organized easily with the help of this Epson scanner
  • EASY SETUP — USB-powered connect to your computer for quick and simple scanning; No batteries or external power supply required to operate portable document scanner; Standard Connectivity: USB 2.0

What full-page capture includes—and what it does not

fullPage: true captures the full scrollable page rather than only the currently visible viewport. It does not mean that the viewport itself has been made taller. Use a clip rectangle when you need only a bounded region with specified coordinates and dimensions; see the Puppeteer ScreenshotOptions API for a comparable framework option, or the Chrome DevTools Protocol Page domain for lower-level capture controls.

CSS width is not always the output image width

The requested viewport width is in CSS pixels. The saved image’s raster width can differ according to screenshot scale. Playwright’s scale: 'css' produces one image pixel per CSS pixel; scale: 'device' produces device pixels and can make output larger on high-density displays. Choose the scale deliberately if exact image dimensions matter.

Rank #2
Sale
Brother DS-640 Compact Mobile Document Scanner, (Model: DS640)
  • FAST SPEEDS - Scans color and black and white documents a blazing speed up to 16ppm (1). Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
  • ULTRA COMPACT – At less than 1 foot in length and only about 1. 5lbs in weight you can fit this device virtually anywhere (a bag, a purse, even a pocket).
  • READY WHENEVER YOU ARE – The DS-640 mobile scanner is powered via an included micro USB 3. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan.
  • WORKS YOUR WAY – Use the Brother free iPrint&Scan desktop app for scanning to multiple “Scan-to” destinations like PC, Network, cloud services, Email and OCR. (2) Supports Windows, Mac and Linux and TWAIN/WIA for PC/ICA for Mac/SANE drivers. (3)
  • OPTIMIZE IMAGES AND TEXT – Automatic color detection/adjustment, image rotation (PC only), bleed through prevention/background removal, text enhancement, color drop to enhance scans. Software suite includes document management and OCR software. (4)

Make dynamic content ready before capturing

Full-page capture does not by itself guarantee that lazy images, animations, sticky elements, or infinite-scroll content are in the desired state. If important content appears only after scrolling or interaction, trigger that behavior and wait for the content before taking the screenshot. Check the saved image for the particular page, especially when capture results are used for QA or visual comparisons.

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

Other browser automation options

Playwright and Puppeteer both document viewport sizing and full-page screenshot controls. Choose based on the browser automation stack, language and runtime integration, configuration, and output behavior your project already needs. The API references establish the controls, not a performance or image-quality ranking.

Puppeteer example

In Puppeteer, set the viewport before navigation and pass fullPage: true when taking the screenshot. The official Puppeteer Screenshots guide documents the screenshot workflow.

Rank #3
Sale
Epson Workforce ES-400 II High-Speed Color Duplex Desktop Document Scanner
  • FAST DOCUMENT SCANNING — Document scanner with feeder allows you to speed through stacks with a 50-sheet Auto Document Feeder (ADF); Efficient office scanner to help you scan more productively
  • INTUITIVE, HIGH-SPEED SOFTWARE — Quickly scan with this desktop document scanner; Epson ScanSmart Software lets you easily preview scans, email files, upload to the cloud, and more; Plus, automatic file naming saves even more time
  • SEAMLESS INTEGRATION — Easily incorporate your data into most document management software with the included TWAIN driver; Office document scanner integrates seamlessly with business workflows
  • EASY SHARING — Duplex scanner allows you to scan straight to email or popular cloud storage2 services like Dropbox, Evernote, Google Drive, and OneDrive for simple storage and sharing
  • SIMPLE FILE MANAGEMENT — Scanner allows the creation of searchable PDFs with Optical Character Recognition (OCR) and convert scans to editable Word or Excel files effortlessly; Designed for home and office document scanning
import puppeteer from 'puppeteer';

const browser = await puppeteer.launch();
try {
  const page = await browser.newPage();
  await page.setViewport({ width: 1280, height: 800 });
  await page.goto('https://example.com', { waitUntil: 'networkidle0' });
  await page.screenshot({ path: 'full-page.png', fullPage: true });
} finally {
  await browser.close();
}

When to use Chrome DevTools Protocol directly

The Chrome DevTools Protocol’s Page.captureScreenshot accepts a clip region and a captureBeyondViewport boolean; its viewport geometry uses device-independent pixels. Use it when you need direct protocol-level control. For ordinary full-page capture, a framework’s documented option is generally the simpler interface.

Troubleshooting

  • The page has a mobile or desktop layout you did not expect: confirm the width is set before navigation and that it is the intended CSS-pixel value.
  • The image shows only the visible portion: check that the screenshot call includes fullPage: true, rather than relying on a taller viewport or a clip rectangle.
  • Images or sections are missing: they may be lazy-loaded or require scrolling, interaction, or additional waiting. Trigger the relevant behavior, wait for the content, then inspect the output.
  • The PNG’s pixel width is not the viewport width: check the screenshot scale. Device-pixel output can be larger than CSS-pixel output.
  • A navigation wait never completes or is unsuitable: sites with ongoing network activity may not reach a network-idle condition. Use a wait that fits the page, such as waiting for a relevant selector or a deliberate delay, and verify the result rather than assuming navigation completion means all content is ready.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. Its full-page capture supports lazy images; set a viewport width with viewport_width and a height with viewport_height:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
  • Scanner type: Document
  • Connectivity technology: USB
  • With Auto Scan Mode, the scanner automatically detects what you're scanning
  • Digitize documents and images
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -d viewport_width=1280 -d viewport_height=800 -o shot.webp

See the ScreenshotNeo API documentation for request options. It removes cookie and consent banners, newsletter popups, and chat widgets before capture; each cleanup step can be disabled. Bot checks, blank pages, and failed loads are not billed. Its MCP server lets AI agents take screenshots, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.

Sign up for ScreenshotNeo’s free plan to try it with no card.

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

Frequently Asked Questions

Can I capture a full page at a width such as 390 CSS pixels?

Yes. Set the viewport width to 390 before navigation, then request a full-page screenshot. The page layout follows that CSS-pixel width; the resulting raster width also depends on the screenshot scale.

Best Value
Sale
ScanSnap iX2500 Wireless or USB High-Speed Document Scanner, Black
  • OUR MOST ADVANCED SCANSNAP. Large touchscreen, fast 45ppm double-sided scanning, 100-sheet document feeder, Wi-Fi and USB connectivity, automatic optimizations, and support for cloud services. Upgraded replacement for the discontinued iX1600
  • CUSTOMIZABLE. SHARABLE. Select personalized profiles from the touchscreen. Send to PC, Mac, mobile devices, and clouds. QUICK MENU lets you quickly scan-drag-drop to your favorite computer apps
  • STABLE WIRELESS OR USB CONNECTION. Built-in Wi-Fi 6 for the fastest and most secure scanning. Connect to smart devices or cloud services without a computer. USB-C connection also available
  • PHOTO AND DOCUMENT ORGANIZATION MADE EFFORTLESS. Easily manage, edit, and use scanned data from documents, receipts, photos, and business cards. Automatically optimize, name, and sort files
  • AVOIDS PAPER JAMS AND DAMAGE. Features a brake roller system to feed paper smoothly, a multi-feed sensor that detects pages stuck together, and skew detection to prevent paper damage and data loss

Does full-page capture include content on an infinite-scroll page?

Not necessarily. Scroll or otherwise trigger the content you need to load, wait for it to appear, and verify the saved image.

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

Quick Recap

Bestseller No. 4
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
Scanner type: Document; Connectivity technology: USB; With Auto Scan Mode, the scanner automatically detects what you're scanning
$75.00

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.

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.

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
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.