Run window.print() in the page’s browser console, then choose a PDF destination in the print dialog and save. The command opens the browser’s normal print flow; it does not silently download or save a PDF for you.
Capture the page as a PDF from the console
- Open the webpage you want to save.
- Open the browser’s developer tools and select the Console. In Firefox, the documented Web Console shortcut is Ctrl+Shift+K on Windows/Linux or Cmd+Opt+K on macOS; shortcuts differ in other browsers and may vary by setup. Mozilla’s Web Console documentation explains how to run expressions in the page context.
- Enter
window.print()and press Enter. - In the print dialog, choose the PDF destination, review the preview and settings, then save the file.
window.print();
MDN describes window.print() as opening the print dialog for the current document. If the document is still loading, the method waits for it to finish; while the dialog is open, the call blocks. MDN: Window.print()
As an Amazon Associate I earn from qualifying purchases.
Choose the PDF destination and check the preview
Destination labels and available controls depend on the browser, operating system and print system. For example, Chrome Help says to select “Save as PDF”; Firefox Help says to choose “Save to PDF” under Destination. Chrome printing instructions · Firefox printing instructions
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows 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 reinstall- Check the page range, orientation, paper size and scale so content is not clipped or made unreadably small.
- Adjust margins and headers or footers if they interfere with the page.
- Enable background graphics if the PDF needs the page’s colored backgrounds or other background styling.
A print layout is not necessarily a copy of the live screen. Firefox notes that a site can be configured to look different on paper; preview the output and change print settings before saving. Edge documents similar controls for paper size, margins, scale and background graphics. Microsoft Edge printing instructions
#1 Best Overall
- 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
When the console method is useful—and when it is not
The console is a convenient way to trigger the same interactive print flow without using the keyboard shortcut or menu. It still requires a person to choose the PDF destination and save. It is therefore suitable for an occasional capture, not unattended batch work.
Because the call waits if the document is loading, it does not provide a separate control for waiting on a particular image, selector or application update. If a page fills in content after it initially loads, wait until the desired content appears before running the command, then inspect the preview.
Rank #2
- 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)
Automate PDF output with Chrome Headless
For unattended Chrome output, Chrome for Developers documents a separate command-line workflow using --headless --print-to-pdf. Run this in a terminal, not the browser console:
Recommended Free Tools
chrome --headless --print-to-pdf https://example.com/
The command writes output.pdf to the current working directory. Depending on the installation, you may need to use the full path to the Chrome executable and replace the example URL with the page you need. Chrome’s documented options include:
Rank #3
- 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
--no-pdf-header-footersuppresses the date/time header and URL/page-number footer.--timeout=5000waits up to five seconds before capture.--virtual-time-budget=42000advances virtual time for time-dependent page code.
These numbers are example flag values in Chrome’s documentation, not general guarantees about how long a particular page needs. Adjust timing for the page and verify the resulting PDF. Chrome Headless documentation
Troubleshooting
- The console says the command is undefined or shows an error: Confirm you are in the Console for the tab containing the page and that the expression is
window.print(). The command applies to the current document. - No PDF file appears after running the command: That is expected until you select a PDF destination in the print dialog and complete the save action.
window.print()does not select a destination on its own. - The PDF is missing content or looks different from the page: Wait for the relevant content to appear, reopen or refresh the preview, and check the page’s print layout, scale, margins and background settings.
- The page is split awkwardly or text is clipped: Try a different orientation, scale, paper size or margin setting, and review the preview before saving.
- The automated PDF is captured too early: Increase or change the Chrome Headless timing option appropriate to the page, then check the output. A fixed wait cannot guarantee that every site’s dynamic content has finished loading.
Or skip the browser setup
For a direct PDF capture through an API, ScreenshotNeo takes one GET request with a URL and can return a PDF. Its capture flow accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and responses identify the page verdict and billing status in headers. It also offers an MCP server with capture_pdf for AI agents.
Example cURL request, adapted to capture a PDF:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com --data-urlencode format=pdf -o page.pdf
See the ScreenshotNeo API documentation for request options and response details. ScreenshotNeo has a free plan with 1,000 screenshots per month and no card required; paid plans start at $5 for 3,000. Visit ScreenshotNeo and sign up for 1,000 free screenshots a month, with no card.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsQuick Recap
Best Value
- 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
Rank #4
- Scanner type: Document
- Connectivity technology: USB
- With Auto Scan Mode, the scanner automatically detects what you're scanning
- Digitize documents and images
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.




