Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk4 min

How to Test a Website’s Print CSS with Screenshots

Emulate print CSS in Chrome DevTools for quick inspection, or use Playwright screenshots and reference assertions for repeatable visual checks. Use PDFs to verify pagination separately.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To test print CSS without printing, emulate the print media type in Chrome DevTools, then inspect or capture the page. For repeatable checks, use Playwright to emulate print media and compare a screenshot with a reviewed baseline. Use a PDF as a separate check when you need to verify pagination and page breaks.

Inspect print styles manually in Chrome DevTools

  1. Open the page in Chrome and open DevTools.
  2. Open the Rendering panel. If it is not visible, use the DevTools command menu or panel options to find it.
  3. In Emulate CSS media type, select print. Chrome will render the page using print media styles without sending it to a physical printer. See Chrome’s CSS media emulation instructions.
  4. Check the intended print changes: print-only content should appear, screen-only content should disappear, and print layout rules should take effect. Edit CSS in DevTools to diagnose issues, then make the lasting changes in your project stylesheet.
  5. Capture a screenshot if you need a visual record. DevTools emulation is useful for quick inspection; the documented workflow does not provide a built-in screenshot baseline assertion.

Automate print-view screenshots with Playwright

Playwright’s Page API supports print media emulation and screenshots. This runnable Node.js example uses the Playwright library directly to save a full-page print-view image. Install Playwright in your project first, and replace the URL with the page you want to test.

As an Amazon Associate I earn from qualifying purchases.

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

(async () => {
  const browser = await chromium.launch();
  const page = await browser.newPage();

  await page.goto('https://example.com', { waitUntil: 'networkidle' });
  await page.emulateMedia({ media: 'print' });
  await page.screenshot({ path: 'print-view.png', fullPage: true });

  await browser.close();
})();

The key sequence is navigation, page.emulateMedia({ media: 'print' }), then page.screenshot(). Playwright also accepts screen as a media type. Its Page API documentation describes both media emulation and screenshot options.

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.

Turn the screenshot into a visual regression test

With the Playwright Test runner, use toHaveScreenshot to create a reference image on the first run and compare later captures against it:

#1 Best Overall
Brother DCP-L2640DW Wireless Compact Monochrome Multi-Function Printer, Copy, Scan, Duplex, Mobile Printing
  • BEST FOR SMALL BUSINESSES – Engineered for extraordinary productivity, the Brother DCP-L2640DW Monochrome (Black & White) 3-in-1 combines laser printer, scanner, copier in one compact footprint and delivers high-quality black & white prints
  • FAST PRINTER WITH EFFICIENT SCANNING – Produces documents quickly with print speeds up to 36 ppm(2) and scan speeds up to 23.6/7.9 ipm(3) (black/color). A 50-page auto document feeder(4) allows for convenient, time saving multi-page scanning and copying
  • FLEXIBLE CONNECTION OPTIONS – Easily navigate the changing demands of your business with secure multi-device connectivity via built-in dual-band wireless (2.4GHz / 5GHz) and Ethernet. Or connect locally to a single computer via USB interface
  • BROTHER MOBILE CONNECT APP – Print, scan, and manage your wireless printer anytime, from almost anywhere from your mobile device. Order Brother Genuine Supplies, track toner usage, and complete more work on-the-go(5)
  • CHOOSE BROTHER GENUINE TONER – When it’s time to replace your toner, be sure to choose Brother Genuine TN830 or TN830XL replacement toner. And with Refresh EZ Print Subscription Service, you’ll never worry about running out of toner again and you’ll enjoy savings of up to 50%(6) on Brother Genuine Toner. Get started with Refresh today with a Free Trial(1)
import { test, expect } from '@playwright/test';

test('print view matches its reference', async ({ page }) => {
  await page.goto('https://example.com');
  await page.emulateMedia({ media: 'print' });
  await expect(page).toHaveScreenshot('print-view.png', { fullPage: true });
});

The screenshot assertion waits until two consecutive screenshots are identical before comparing. It is a Playwright Test assertion, not an assertion supplied by the standalone Playwright library. See Playwright’s visual comparisons guide and PageAssertions API.

Keep baselines useful

  • Use the same browser, operating system, settings, and execution environment when creating and updating references. Rendering can vary with the operating system, browser version, settings, hardware, power source, and headless mode.
  • Control changing content. Playwright supports a screenshot-only stylesheet through stylePath and masks for selected elements; use these for content such as timestamps or rotating promotions that is not part of the layout you intend to verify.
  • Choose an acceptable pixel or ratio difference threshold for your project. A threshold is a team decision, not a universal measure of correctness.
  • Review and version-control reference updates. Do not accept every changed screenshot automatically; confirm whether the difference is an intended design change.
  • Assert both sides of the media switch where relevant: print-only and screen-only elements should have the expected visibility in each mode.

A screenshot comparison can reveal visual regressions, but it cannot establish semantic correctness or guarantee that every physical printer will produce an identical page.

Rank #2
Brother HL-L2405W Wireless Compact Monochrome Laser Printer with Mobile Printing, Black & White Output | Includes Refresh Subscription Trial(1), Works with Alexa
  • BEST FOR HOMES & HOME OFFICES – Engineered for consistent, premium print quality, the Brother HL-L2405W Monochrome (Black & White) Laser Printer delivers sharp, crisp prints at an affordable price. Prints one-sided documents at speeds up to 30ppm(2)
  • COMPACT, CONNECTED PRINTER – Flexible connection options make this an ideal printer for home use and at-home offices. Securely connect to multiple devices with built-in dual-band wireless (2.4GHz/5GHz) or locally to a single computer via USB interface
  • BROTHER MOBILE CONNECT APP – Manage your printer remotely and print from your mobile device anytime, from almost anywhere. Order Brother Genuine Supplies, track toner usage, and complete more work on-the-go(3)
  • VERSATILE PAPER HANDLING – Enjoy seamless, reliable everyday printing with the 250-sheet paper tray(4) and a manual feed slot that enables printing on envelopes and specialty pape
  • BROTHER IS AT YOUR SIDE – Backed by Brother with a 1-year limited warranty and free online, call, or live chat support for the life of your printer

Use a PDF to check pagination separately

When the question is whether content breaks across pages correctly, generate and inspect a PDF as well as taking a screenshot. Playwright’s page.pdf() generates a PDF using print CSS, making it useful for checking page size, page breaks, and printable output. It is a PDF artifact, not a screenshot. Its default print color handling can modify colors; for exact PDF colors, Playwright points to the CSS property -webkit-print-color-adjust. Refer to the Page API documentation.

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

Choose the workflow for the question you need to answer

Need Chrome DevTools Playwright
Fast diagnosis while editing Emulate print in Rendering and inspect the live page. Requires browser automation setup.
Repeatable checks across changes Depends on repeating manual steps. Screenshot assertions compare against a reference image.
Visual output Live rendered page; capture a screenshot manually if needed. Save a screenshot or compare it with a baseline.
Pagination and page breaks Generate a PDF separately. page.pdf() checks paginated print output.
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 can return a website screenshot with one GET request. For example, this cURL call saves a WebP screenshot of Stripe:

Quick Recap

Bestseller No. 3
Canon imageCLASS LBP6030w - Monochrome Single-Function Wireless Compact Wireless Laser Printer, 1 Year Limited Warranty, 19 PPM, White - Print Only
Canon imageCLASS LBP6030w - Monochrome Single-Function Wireless Compact Wireless Laser Printer, 1 Year Limited Warranty, 19 PPM, White - Print Only
FAST PRINT SPEEDS: Print up to 19 pages per minute.; PAPER CAPACITY: Up to 150 sheets.; SUSTAINABILITY: Uses less than 2 watts in Energy Saver mode.
$134.99
Bestseller No. 5
HP LaserJet M110w | Monochrome | Laser Printer
HP LaserJet M110w | Monochrome | Laser Printer
WORLD'S SMALLEST LASER IN ITS CLASS – Precision laser printing that fits anywhere; FAST PRINT SPEEDS – Up to 21 black-and-white pages per minute single-sided
Best Value
HP LaserJet M110w | Monochrome | Laser Printer
  • FROM AMERICA'S MOST TRUSTED PRINTER BRAND – Perfect for small teams printing professional-quality black & white documents and reports. Perfect for 1-3 people
  • WORLD'S SMALLEST LASER IN ITS CLASS – Precision laser printing that fits anywhere
  • FAST PRINT SPEEDS – Up to 21 black-and-white pages per minute single-sided
  • WIRELESS WITH SELF-RESET – Helps you stay connected
  • PRINT FROM ANY DEVICE – Wireless printing from any mobile device, PC or tablet. Works with Microsoft, Mac, AirPrint, Android, Chromebook and more
Rank #4
Brother HL-L2460DW Wireless Compact Monochrome Laser Printer with Duplex, Mobile Printing, Black & White Output | Includes Refresh Subscription Trial(1), Works with Alexa
  • BEST FOR HOME OFFICES & SMALL TEAMS – Engineered for consistent, premium print quality, the Brother HL-L2460DW Monochrome (Black & White) Laser Printer produces documents that are clear, crisp, and easy to review and share, all at an affordable price
  • COMPACT, CONNECTED, EXCEPTIONALLY EFFICIENT– Connect with built-in dual-band wireless (2.4GHz/5GHz), Ethernet, or to a single computer via USB interface. Prints at speeds up to 36ppm(2), plus automatic duplex printing saves time and reduces paper waste
  • BROTHER MOBILE CONNECT APP – Manage your wireless printer remotely and print from your mobile device anytime, from almost anywhere. Order Brother Genuine Supplies, track toner usage, and complete more work on-the-go(3)
  • VERSATILE PAPER HANDLING – Tackle high-volume black & white printing with the 250-sheet capacity paper tray.(4) The manual feed slot enables printing on envelopes and specialty paper
  • BROTHER IS AT YOUR SIDE – Backed by Brother with a 1-year limited warranty and free online, call, or live chat support for the life of your printer
Rank #3
Canon imageCLASS LBP6030w - Monochrome Single-Function Wireless Compact Wireless Laser Printer, 1 Year Limited Warranty, 19 PPM, White - Print Only
  • FAST PRINT SPEEDS: Print up to 19 pages per minute.
  • COMPACT DESIGN: Space-saving, compact design fits anywhere in your home, school or small office.
  • WIRELESS CONNECTIVITY: Print from almost anywhere in your workspace using your compatible mobile device.
  • PAPER CAPACITY: Up to 150 sheets.
  • SUSTAINABILITY: Uses less than 2 watts in Energy Saver mode.
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 documentation for API details. Cookie banners, popups, and chat widgets are removed before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Sign up for the free plan.

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 *

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
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

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.