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

Set the browser viewport to the width you want before opening the page, then take a full-page screenshot. In Playwright, use page.setViewportSize() followed by page.screenshot({ fullPage: true }). This captures the page’s full scrollable document while keeping its responsive layout evaluated at your chosen CSS-pixel width.

Capture a full page at a specific width with Playwright

Set both viewport dimensions before navigation: the width determines responsive layout, while the height is the visible browser viewport height. A practical height such as 800 CSS pixels is usually sufficient; the full-page option, not a taller viewport, extends the capture to the scrollable page.

Install Playwright and its Chromium browser if they are not already available in your project:

npm install playwright
npx playwright install chromium

Save this as screenshot.js and run it with node screenshot.js. Change targetUrl, width, and height as needed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#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
const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch();
  try {
    const page = await browser.newPage();
    const width = 1280;
    const height = 800;

    await page.setViewportSize({ width, height });
    await page.goto('https://example.com', { waitUntil: 'load' });
    await page.screenshot({ path: 'full-page.png', fullPage: true });
  } finally {
    await browser.close();
  }
})();

The order matters when capturing a responsive breakpoint: set the viewport before goto(). Playwright cautions that many sites do not expect a phone-sized viewport to change after the page has loaded. See the Playwright Page API and Playwright screenshots documentation.

Set the viewport when creating a context

If several pages should share the same viewport, configure it on the browser context instead of setting it page by page:

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)
const context = await browser.newContext({
  viewport: { width: 1280, height: 800 }
});
const page = await context.newPage();
await page.goto('https://example.com', { waitUntil: 'load' });
await page.screenshot({ path: 'full-page.png', fullPage: true });

Use either this context configuration or page.setViewportSize() before navigation; you do not need both for the same page.

Use Puppeteer if it is already in your project

Puppeteer provides the same essential sequence: configure the page viewport, navigate, then request a full-page screenshot. Install Puppeteer and save the following as screenshot.js:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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
npm install puppeteer
const puppeteer = require('puppeteer');

(async () => {
  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: 'load' });
    await page.screenshot({ path: 'full-page.png', fullPage: true });
  } finally {
    await browser.close();
  }
})();

Run it with node screenshot.js. Puppeteer documents fullPage as capturing the full scrollable page; its screenshots guide and ScreenshotOptions API describe the available options.

Choose full-page capture or a clipped region

fullPage: true captures the full scrollable page; it is not a command to make the visible viewport taller. If you want only a rectangle, use a clip region instead. Playwright supports a clip rectangle, and the lower-level Chrome DevTools Protocol Page.captureScreenshot accepts clip geometry and a captureBeyondViewport boolean. Protocol viewport geometry uses device-independent pixels; framework wrappers may manage these details differently. For ordinary full-page captures, the framework’s documented full-page option is simpler. See the Chrome DevTools Protocol Page domain.

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

Understand CSS width versus image pixel width

The viewport width is measured in CSS pixels, which control the page’s responsive layout. The resulting image’s raster width can differ. Playwright’s screenshot scale option can produce one image pixel per CSS pixel with scale: 'css', or device-pixel output with scale: 'device'. Device scaling can make the image larger on high-density displays. Choose the scale based on the output dimensions your downstream tool or test expects; see the Playwright screenshots documentation.

Make sure dynamic content is ready

A full-page flag does not guarantee that every page-specific item is loaded or in the desired state. Lazy images may load only after scrolling; animations, sticky elements, and infinite-scroll feeds can also affect the result. If the page depends on content appearing after scrolling or interaction, perform that action and wait for the relevant content before taking the screenshot, then inspect the image.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • For a known element, wait for it explicitly with Playwright’s locator wait methods before capture.
  • For lazy-loaded sections, scroll through the page in steps and allow content to load before capturing.
  • For animations or overlays that make the result inconsistent, consider page-specific test setup or screenshot options; verify the result rather than assuming a generic wait will cover every site.

Or skip the browser setup

ScreenshotNeo is a website screenshot API with full-page capture, lazy-image loading, and viewport options. A GET request returns an image or PDF; this example saves a WebP screenshot of the target page:

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
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, including viewport configuration. Its consent-banner handling accepts the banner like a visitor and removes 60+ known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for the free plan.

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

Troubleshoot common capture problems

Symptom Likely cause What to do
The page has a mobile or desktop layout you did not expect The viewport was set after navigation, or the width differs from the intended CSS-pixel breakpoint. Set the width before goto(), then capture again. Confirm the width is the layout viewport you intend to test.
The image is wider or larger in pixels than expected Raster scale may use device pixels rather than CSS pixels. Use Playwright’s scale: 'css' when you need one image pixel per CSS pixel, or retain device scaling when that output is desired.
Images or lower sections are missing Content may load lazily, require scrolling, or appear only after interaction. Scroll or interact to trigger it, wait for the relevant content, and verify the resulting capture.
The output shows only the visible screen The screenshot call omitted the full-page option. Use fullPage: true; use a clip only when a bounded region is intended.
The script fails before taking a screenshot The browser binary may not be installed, or browser launch may be unavailable in the environment. For Playwright, install Chromium with npx playwright install chromium. Check the runtime and browser-launch error for environment-specific restrictions.

Which approach should you use?

Use whichever framework already fits your project. Playwright and Puppeteer both document viewport sizing and full-page capture; the cited documentation does not establish a comparative speed or image-quality winner. Use Chrome DevTools Protocol directly only when its lower-level clip or beyond-viewport controls are needed.

Frequently Asked Questions

Does full-page capture change the page’s responsive breakpoint?

No. The breakpoint is driven by the configured viewport width; full-page capture extends the captured area vertically.

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.

Can an infinite-scroll page be captured in full with one screenshot call?

Not necessarily. Content that loads only after scrolling may need to be triggered and loaded before the screenshot is taken.

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.