Chrome’s command-line switches can save a rendered webpage as an image or PDF, but they do not send an arbitrary image file directly to a printer. Use --headless --screenshot for a raster image, --headless --print-to-pdf for a printable PDF, then submit that file through your operating system’s print workflow. The commands below work with a URL; an existing image file must first be opened by a local webpage or printed with a separate operating-system tool.
Understand what Chrome can output
There are three separate jobs that are often described as “printing with Chrome”:
- Screenshot: Chrome renders a URL and writes a PNG, JPEG or WebP image.
- PDF creation: Chrome renders a URL and writes a PDF document.
- Physical printing: Your operating system or managed Chrome print workflow sends a document to a configured printer.
The Headless command-line reference documents the first two jobs. Neither --screenshot nor --print-to-pdf means that paper has been produced. If you need paper, create the image or PDF first and then print that artifact normally.
Prerequisites and command syntax
- Install a current Chrome or Chromium build that supports Headless mode. Unified Headless mode has been available since Chrome 112; current builds should be checked against their own command-line reference.
- Use the executable name appropriate to your platform: commonly
chrome,google-chrome,chromiumorchromium-browser. - Run the command from a directory where you can write the output file, or provide an absolute output path.
- Quote URLs and paths that contain shell-sensitive characters or spaces.
The general form is:
chrome --headless [switches] https://example.com
On macOS, Chromium’s platform guidance uses the application binary inside the Google Chrome app bundle; escape spaces in the path or quote the entire executable path.
Recommended Free Tools
#1 Best Overall
Save a webpage as an image
To capture a rendered page as a PNG:
chrome --headless --screenshot --window-size=1200,1600 https://example.com
Chrome writes screenshot.png in the current working directory unless you specify a path supported by your build. The --window-size=1200,1600 switch sets the viewport dimensions in pixels; it is not a paper size.
Choose an explicit image path and format
When your Chrome version accepts an explicit screenshot path, use an extension that matches a supported format:
chrome --headless --screenshot=/tmp/example.webp --window-size=1440,1200 https://example.com
The Chromium command handler recognizes .jpeg, .jpg, .png and .webp. Unsupported extensions are rejected. If a path behaves differently in your release, omit the extension-specific path and use the default PNG, then convert it with an image utility.
What the screenshot contains
The result is a capture of the page state Chrome reached at capture time. It is not automatically a full physical page, and it does not guarantee that every lazy image, font, advertisement or script finished loading. Increase the viewport, use a page designed for the desired dimensions, or use a PDF workflow when pagination matters.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Save a webpage as a PDF for printing
For a document that you intend to print, generate a PDF:
Rank #2
- Affordable Versatility - A budget-friendly all-in-one printer perfect for both home users and hybrid workers, offering exceptional value
- Crisp, Vibrant Prints - Experience impressive print quality for both documents and photos, thanks to its 2-cartridge hybrid ink system that delivers sharp text and vivid colors
- Effortless Setup & Use - Get started quickly with easy setup for your smartphone or computer, so you can print, scan, and copy without delay
- Reliable Wireless Connectivity - Enjoy stable and consistent connections with dual-band Wi-Fi (2.4GHz or 5GHz), ensuring smooth printing from anywhere in your home or office
- Scan & Copy Handling - Utilize the device’s integrated scanner for efficient scanning and copying operations
chrome --headless --print-to-pdf=output.pdf --no-pdf-header-footer https://example.com
This writes output.pdf to the current directory when using the shown relative path. You can provide an absolute path, such as --print-to-pdf=/tmp/example.pdf. The PDF is still a file; print it afterward with your desktop PDF viewer, operating-system print command or managed Chrome print workflow.
Remove generated headers and footers
--no-pdf-header-footer suppresses the generated date/time header and URL/page footer. Older Chrome releases may require the deprecated switch name --print-to-pdf-no-header. If the current name is reported as unknown, try the legacy spelling or upgrade Chrome.
PDF versus screenshot
| Need | Switch | Artifact | Best use |
|---|---|---|---|
| Rendered pixels | --screenshot |
PNG, JPEG or WebP | Images, previews and visual regression files |
| Printable layout | --print-to-pdf |
Paper printing, archiving and sharing | |
| Paper output | Separate print workflow | Physical pages | A configured local or managed printer |
Wait for client-rendered content
Pages built by JavaScript may need time before capture. Chrome’s documented five-second example is:
Windows 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 reinstallOutdated 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 matchchrome --headless --screenshot --timeout=5000 https://example.com
--timeout=5000 waits five seconds of real time before capture. The virtual-time alternative advances page timers:
chrome --headless --screenshot --virtual-time-budget=5000 https://example.com
Virtual time can reach a later application state without waiting the full five seconds in wall-clock time. Neither option proves that a remote image, API request or third-party script successfully loaded. For reliable automation, make the page deterministic, check the resulting file, and retry failed navigations.
Rank #3
- Affordable Versatility - A budget-friendly all-in-one printer perfect for both home users and hybrid workers, offering exceptional value
- Crisp, Vibrant Prints - Experience impressive print quality for both documents and photos, thanks to its 2-cartridge hybrid ink system that delivers sharp text and vivid colors
- Effortless Setup & Use - Get started quickly with easy setup for your smartphone or computer, so you can print, scan, and copy without delay
- Reliable Wireless Connectivity - Enjoy stable and consistent connections with dual-band Wi-Fi (2.4GHz or 5GHz), ensuring smooth printing from anywhere in your home or office
- Scan & Copy Handling - Utilize the device’s integrated scanner for efficient scanning and copying operations
Capture Chrome scheme URLs
For chrome:// targets, Chrome documents --allow-chrome-scheme-url as required. That switch is available from Chrome 123:
chrome --headless --allow-chrome-scheme-url --screenshot chrome://gpu
Only use this for pages your Chrome build permits Headless to access. Normal web URLs do not need the switch.
Printing an existing image file
Chrome’s Headless switches are URL-oriented. The documentation does not describe --print-to-pdf as a general image-file-to-paper command. To print an existing photo.png:
- Open the image in a browser tab or image viewer and use that application’s print command, or create a small local HTML page containing the image and pass its URL to Chrome’s PDF switch.
- Inspect the resulting PDF for scaling, orientation, margins and page count.
- Send the PDF to your configured printer using the operating system or enterprise print workflow.
A local HTML wrapper gives you control over paper CSS, but it introduces browser setup that is unnecessary when you only need a screenshot file.
From PDF to a physical printer
After creating output.pdf, print it with your platform’s normal command. For example, many Linux distributions provide a lp command:
Rank #4
- AFFORDABLE ALL-IN-ONE FOR HOME AND HOME OFFICE: Print, copy, and scan on one compact wireless printer designed for everyday home office printing, schoolwork, documents, and reports. Produce beautiful prints for results that stand out.
- EASY TO USE WITH CLOUD APP CONNECTIONS: Print from and scan to popular Cloud apps(2), including Google Drive, Dropbox, Box, OneDrive, and more from the simple-to-use 1.8” color display on your printer.
- FULL-SIZE FEATURES IN A COMPACT DESIGN: This printer includes automatic duplex (2-sided) printing, a 20-sheet single-sided Automatic Document Feeder (ADF)(3), and a 150-sheet paper tray(3). Engineered to print at fast speeds of up to 16 pages per minute (ppm) in black and up to 9 ppm in color(4).
- MULTIPLE CONNECTION OPTIONS: Connect your way. Interface with your printer on your wireless network or via USB.
- MOBILE PRINTING MADE EASY: Go mobile with the Brother Mobile Connect app(5) that delivers easy onscreen menu navigation for printing, copying, scanning, and device management from your mobile device. Monitor your ink usage with Page Gauge to help ensure you don’t run out(6).
lp output.pdf
Printer names, authentication and options vary by operating system, so use the print utility documented for your environment. Chrome Enterprise documentation also describes administrator-controlled print handling. Some non-PostScript printers require rasterization, and Windows or Mac administrators may apply a PDF-as-image policy. That policy affects print handling; it is not the same as Headless screenshot output.
Free tools Windows power users keep installed
One-click scans. No signup required.
Common failures and fixes
Chrome is not found
Cause: The executable is not on your PATH or has a different name. Fix: Call the full executable path or use the platform-specific name installed on your system.
The command exits without the expected file
Cause: You are looking in a different directory, lack write permission, or supplied an invalid output extension. Fix: Print the working directory, choose an absolute writable path and use a supported image extension.
The screenshot is blank or incomplete
Cause: Navigation failed, content is client-rendered, a bot check appeared, or resources were still loading. Fix: Test the URL interactively, add a measured timeout or virtual-time budget, check network access and inspect the output rather than assuming success.
Headers or footers remain in the PDF
Cause: Your release uses the older switch spelling. Fix: Try --print-to-pdf-no-header or update Chrome, then verify the generated PDF.
Best Value
- Wireless Bluetooth Printer: Portable thermal printer compatible with iPhone, Android phones, iPad and tablet computers via Bluetooth. For smartphones, please download the "Nada Print" App. You can also connect to laptops and computers for printing using a USB-C cable. (Note: Laptops and computers can only be connected via USB and require the installation of a driver first. Bluetooth connection is not supported.)
- No-ink printing: Only supports US Letter and A4 size thermal paper.(Doesn't support regular paper) The no-ink portable thermal printer uses direct thermal technology, requiring no ink, toner or ribbons, making it environmentally friendly, cost-effective and time-saving. The thermal printer package comes with a roll of US Letter thermal printing paper. Note: When installing the paper, remember to switch the paper size switch on APP
- Clear Print: NDYIN N80 portable thermal printer adopts high-definition printing technology, with a 203DPI resolution to provide you with clear printing results. This mobile printer is compatible with roll paper, folded paper and tattoo transfer paper, supporting printing from your mobile phone PDF, Word, pictures and web pages anytime and anywhere. It is recommended to use our NDYIN thermal paper to achieve good printing quality
- Portable wireless printer for travel: The thermal printer is equipped with a built-in 1500mAh rechargeable battery, which can print 160 sheets of 8.5" x 11" thermal paper after being fully charged. It weighs only 1.5 pounds and is compact in size. This ink-free portable printer can be easily carried in a backpack or briefcase! It is perfect for business travel, cars, small offices, construction sites, schools and homes. You can print documents, contracts, invoices and boarding passes anytime and anywhere
- The N80 thermal printer has a wide range of uses. The package includes the N80 printer, a roll of US Letter paper(7m/roll), a user manual, a guide card, a type-C soft cable and a type C adapter. Note: The charging adapter is not included. Special thermal paper is required for use; ordinary paper cannot be used. This ink-free portable thermal printer is suitable for various scenarios such as home, school, travel, office, and outdoor, meeting the printing needs of different groups of people. This tattoo template printer is also compatible with tattoo transfer paper, making it an ideal choice for tattoo art
The PDF was created but nothing printed
Cause: PDF generation and printer submission are separate operations. Fix: Open the file in a PDF viewer or invoke your operating system’s print command and select an available printer.
Paper dimensions look wrong
Cause: --window-size controls screenshot pixels, not physical paper. Fix: Generate a PDF, set paper size and scaling in the print dialog, and check orientation and margins.
Performance, reliability and cost considerations
- Choose the smallest artifact: screenshots are convenient for pixels; PDFs preserve a print-oriented document flow.
- Control timing deliberately: a real timeout consumes wall-clock time; virtual time changes timer behavior and may expose a later state faster.
- Validate output: a zero-byte or blank file can still indicate a failed page load. Check file size, image dimensions or PDF page count in automation.
- Protect repeatability: freeze dynamic data where possible, use stable viewport dimensions and avoid relying on ads or third-party widgets.
- Separate capture from printing: this lets you archive, review and retry the file before using paper.
Or skip the browser setup
ScreenshotNeo provides a website screenshot API and MCP server. One request captures a URL as PNG, JPEG or WebP, or creates a PDF, without you maintaining a Headless browser.
cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
See the ScreenshotNeo documentation for request options. Cookie banners, newsletter popups and chat widgets are removed before the shot. Bot checks, blank pages and failed loads are never billed, and response headers identify the page verdict and billing status. Its MCP server lets AI agents take screenshots, inspect pages and capture PDFs. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Which command should you use?
- Use
--screenshotwhen the deliverable is an image of a URL. - Use
--print-to-pdfwhen the deliverable must be reviewed or printed as a document. - Use a separate print workflow for physical paper.
- Add
--timeoutor--virtual-time-budgetonly when the page genuinely needs delayed rendering, and verify the output.
Frequently Asked Questions
Can Chrome’s command line print a PNG directly to my printer?
No. Headless Chrome saves a rendered page as an image or PDF; a separate operating-system or managed printer workflow is required for physical output.
What is Chrome’s default screenshot filename?
The documented default is screenshot.png in the current working directory.
Can I use a JPG or WebP screenshot?
Yes, when providing an explicit path, Chromium’s handler supports .jpeg, .jpg, .png and .webp.
Quick Recap
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.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minute

