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

To save a web page as an image or PDF, use Chrome Headless for a quick command-line capture or Playwright when you need repeatable, configurable automation. An image records the page’s visual rendering; a PDF is a document whose layout may be affected by print styling.

Choose an image or PDF

  • Choose an image when you need a visual snapshot at a particular viewport size. Chrome Headless saves a PNG screenshot; Playwright can save a screenshot through its Page API.
  • Choose a PDF when you need a document-style file. Chrome can print a page to PDF, and Playwright can create a PDF with controls for paper format, margins and page ranges.

A PDF is not simply a screenshot saved under another file type: PDF generation can apply print CSS and change the page layout.

Quick conversion with Chrome Headless

Run Chrome’s documented commands in a terminal. The screenshot is saved as screenshot.png and the PDF as output.pdf in the current working directory.

Save a webpage as a PNG

chrome --headless --screenshot --window-size=412,892 https://developer.chrome.com/

--window-size sets the screenshot viewport dimensions. Change the URL to the page you want to capture and the dimensions to the viewport you need.

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

Save a webpage as a PDF

chrome --headless --print-to-pdf https://developer.chrome.com/

To omit the printed URL, date and page details, add --no-pdf-header-footer:

chrome --headless --print-to-pdf --no-pdf-header-footer https://developer.chrome.com/

Chrome’s documentation notes that older versions may use a previous flag name for this option. If Chrome rejects the flag, check the documentation for your installed version: Chrome Headless command-line reference.

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)

Handle slow-loading pages carefully

You can set a maximum wait in milliseconds with --timeout=<milliseconds>. For example, add --timeout=5000 to allow up to five seconds before capture. This is a time limit, not proof that images, scripts or other asynchronous content have finished rendering. Check the saved file if the page relies on content that loads after navigation.

Automate captures with Playwright

Use Playwright when captures need to run as part of a script or application. Its Page API provides separate methods for screenshots and PDFs; consult the Playwright Page API reference for current options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Canon imageFORMULA R10 - Portable Document Scanner, USB Powered, Duplex Scanning, Document Feeder, Easy Setup, Convenient, Perfect for Mobile Users, White
  • STAY ORGANIZED – Easily convert your paper documents into digital formats like searchable PDF files, JPEGs, and more.Power Consumption : 2.5W or less (Energy Saving Mode: 0.7W). Suggested Daily Volume : 500 scans..Does it contain liquid: no
  • CONVENIENT AND PORTABLE –lightweight and small in size, you can take the scanner anywhere from home offices, classrooms, remote offices, and anywhere in between
  • HANDLES VARIOUS MEDIA TYPES – Digitize receipts, business cards, plastic or embossed cards, reports, legal documents, and more
  • FAST AND EFFICIENT – No technical hurdles or complicated setups here; easily scan both sides of a document at the same time, in color or black-and-white, at up to 12 pages-per-minute, and with a 20 sheet automatic feeder
  • BROAD COMPATIBILITY – Works with both Windows and Mac devices, be it laptop or computer

Save a screenshot

After launching a browser and navigating a page, save the rendered page with page.screenshot():

await page.goto('https://developer.chrome.com/');
await page.screenshot({ path: 'screenshot.png' });

Create a PDF

page.pdf() returns a PDF buffer and can save the result to a path. For instance:

Rank #4
IRIScan Express 4 Black Compact Portable USB Simplex Document Scanner, 8 PPM for Contracts, Invoices and Business Cards, Compatible with Windows, Readiris PDF Included
  • IRIScan Express, portable scanner : scans color and black and white documents a blazing speed up to 8ppm simplex. Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
  • IRIScan Express mobile scanner is powered via an included micro USB 2. 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. USB cable provided. AC Adapter not provided and not needed.
  • IRIScan flatbed scanner uses a simplex scanning mode allows for quick and straightforward scanning of single-sided documents. IRIScan with its full portable features is the ideal document scanners for computers.
  • IRIScan document scanner : Versatile scanning capabilities, including scanning to Word, PDF, and Excel formats with companion software provided Readiris OCR
  • Receipt scanner and card scanner with Additional features include scanning business cards directly to Outlook, photo scanning, and receipt scanning for efficient document management
await page.goto('https://developer.chrome.com/');
await page.pdf({ path: 'page.pdf', format: 'A4', printBackground: true });

Playwright’s PDF generation uses print CSS media by default. That means a page may use a different layout in the PDF than it does on screen. To generate the PDF using screen media instead, emulate it before calling page.pdf():

await page.goto('https://developer.chrome.com/');
await page.emulateMedia({ media: 'screen' });
await page.pdf({ path: 'page.pdf' });

Choose PDF settings deliberately

Playwright PDF options include paper format, width and height, margins, scale, page ranges, whether to print background graphics, and whether to prefer CSS-defined page size. Choose settings that suit the document you need; for example, enable background printing if colored sections or background graphics matter.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
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

The API also documents a tagged PDF option, introduced in Playwright 1.42, with a default of false. Setting it does not by itself guarantee an accessible PDF; check the resulting document for accessibility needs.

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 provides a website screenshot API and MCP server. One GET request captures a URL as an image or PDF. The service removes cookie and consent banners, newsletter popups and chat widgets before capture; those cleanup steps can each be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and responses identify the page verdict and billing status in headers.

For example, this cURL request saves a WebP screenshot. See the ScreenshotNeo API documentation for request options.

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

ScreenshotNeo also offers an MCP server with take_screenshot, get_page_info and capture_pdf tools for AI agents. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Sign up for ScreenshotNeo’s free plan.

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

Quick Recap

Bestseller No. 3
Canon imageFORMULA R10 - Portable Document Scanner, USB Powered, Duplex Scanning, Document Feeder, Easy Setup, Convenient, Perfect for Mobile Users, White
Canon imageFORMULA R10 - Portable Document Scanner, USB Powered, Duplex Scanning, Document Feeder, Easy Setup, Convenient, Perfect for Mobile Users, White
BROAD COMPATIBILITY – Works with both Windows and Mac devices, be it laptop or computer; This product is not intended for scanning photographs on photo paper / photographic media
$184.00
Bestseller No. 4
IRIScan Express 4 Black Compact Portable USB Simplex Document Scanner, 8 PPM for Contracts, Invoices and Business Cards, Compatible with Windows, Readiris PDF Included
IRIScan Express 4 Black Compact Portable USB Simplex Document Scanner, 8 PPM for Contracts, Invoices and Business Cards, Compatible with Windows, Readiris PDF Included
Find our Software here : irislink.com/start; IRIScan Express is only compatible Windows platform and not macintosh
$129.00
Bestseller No. 5
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.