First choose the output your report needs: a viewport or full-page image, or a paginated PDF printed onto custom-sized paper. An image screenshot does not have a physical paper size; for a document with defined page dimensions, use the browser’s print-to-PDF operation.
Choose between an image screenshot and a custom-size PDF
| Need | Use | What controls the result |
|---|---|---|
| A picture of what is visible in the browser | Viewport screenshot | Browser viewport dimensions and image settings |
| A picture of one page element | Element screenshot | The selected element and image settings |
| One tall picture of the scrollable page | Full-page screenshot | Page content and image settings |
| A report with custom physical page dimensions | PDF print output | Paper width and height, margins, scaling, page breaks, and print CSS |
Playwright documents image capture through screenshot() and PDF generation through page.pdf() as separate operations. Full-page capture makes an image of the scrollable page, not a PDF page of custom paper size.
As an Amazon Associate I earn from qualifying purchases.
Capture an image with Playwright
Install Playwright and its Chromium browser, then save a script such as screenshot.mjs. The following example captures the full scrollable page; remove fullPage: true to capture only the viewport.
-
Install the package and browser:
npm install playwright, thennpx playwright install chromium.#1 Best Overall
SaleCanon PIXMA TR160 Color Wireless Portable Printer- LIGHTWEIGHT AND PORTABLE - Connect and print on the go with the PIXMA TR160. This lightweight portable printer can fit into a bag or backpack with room to spare.
- HIGH-QUALITY PRINTING ON THE GO - Print documents and photos up to 8.5” x 11” that showcase sharp black text and vibrant details with rich color thanks to a 5-Color Hybrid Ink System, including square and borderless prints.
- SIMPLE & EASY CONNECTIVITY - Printing is only an app away when using the Canon PRINT app, Apple AirPrint4, or Mopria Print Service5 with your compatible device(s) or the cloud.
- WIRELESS DIRECT MODE - Connect your compatible device to the printer even without a wireless router.
- 1.44” OLED DISPLAY - Easily check ink levels, printer status, and other settings with the 1.44” Monochrome OLED.
-
Save this script and replace the URL with the page you need:
import { chromium } from 'playwright'; const browser = await chromium.launch({ headless: true }); const page = await browser.newPage({ viewport: { width: 1440, height: 1000 } }); try { await page.goto('https://example.com', { waitUntil: 'networkidle', timeout: 60000 }); await page.screenshot({ path: 'report-page.png', fullPage: true }); } finally { await browser.close(); } -
Run it with
node screenshot.mjs. The output is a PNG image; place and scale it in your report if you need it to fit a paper page.
For an element capture, use a locator and save the resulting image:
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 matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11await page.locator('.report-summary').screenshot({ path: 'summary.png' });
Replace .report-summary with a CSS selector that identifies the element. Playwright’s screenshot documentation also describes viewport and full-page capture: https://playwright.dev/docs/screenshots.
Generate a PDF on custom paper with Playwright
Use page.pdf() when the output needs actual page dimensions. It accepts width and height with units such as mm, cm, in, and px; named formats such as A4 and Letter are also available. The example below creates a 210 × 297 mm PDF and sets margins explicitly.
Rank #2
- 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
import { chromium } from 'playwright';
const browser = await chromium.launch({ headless: true });
const page = await browser.newPage();
try {
await page.goto('https://example.com', { waitUntil: 'networkidle', timeout: 60000 });
await page.pdf({
path: 'report.pdf',
width: '210mm',
height: '297mm',
margin: { top: '12mm', right: '12mm', bottom: '12mm', left: '12mm' },
printBackground: true
});
} finally {
await browser.close();
}
Change width and height to your required paper dimensions. For example, width: '8.5in' and height: '11in' specify 8.5 by 11 inches. The API’s accepted units and PDF options are documented in Playwright’s Page API.
Understand how print CSS affects page size
page.pdf() renders using print CSS media. A website’s print styles can therefore change colors, hide interface elements, or impose page dimensions and breaks. By default, the API’s PDF settings control the paper size; setting preferCSSPageSize: true gives CSS @page dimensions priority over the API’s width, height, or format settings.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →await page.pdf({
path: 'report.pdf',
width: '210mm',
height: '297mm',
preferCSSPageSize: true
});
Use that option when the page’s own @page rule should determine the dimensions. If you need your specified API dimensions to govern, leave it off and check whether the site’s print CSS still affects layout. Do not assume that setting paper dimensions also guarantees a particular scale or pagination.
Review the PDF before using it
-
Check that content fits within the printable area after margins are applied.
-
Inspect page breaks and make sure headings, tables, and images are not split in inconvenient places.
Rank #3
SaleETIKEZ D90E Inkless Portable Thermal Printer with Case – 8.5" x 11", Black- Portable Wireless Printer - The ETIKEZ D90E is an inkless printer and portable printer that uses advanced thermal technology, requiring no ink, toner, or ribbons, delivering cost-effective prints. Weighs only 2.08lb, the portable printer is incredibly lightweight and compact. Perfect for on-the-go printing during business travels, work, or university, it easily fits into backpacks or briefcases. Ideal for emergency scenarios, contracts, office documents, and more. only prints black and white
- Bluetooth & USB Connectivity - Connect this D90E portable printer to iPhones or Android via Bluetooth. This wireless printer also works with PC over USB. As a thermal printer, it requires the Labelnize app for mobile printing; for PC, install drivers from Labelnize.com or the USB drive. This small portable printeris not compatible with Chromebooks. (Note: For laptop and computer use, connect via USB after downloading the driver from Labelnize.com.)
- Multiple Printing and Format – The wireless portable printer supports 8.5" x 11" US Letter thermal paper (B0GD61HPDC, B0GD5JFC2Q). It meets all your various printing requirements, whether you're on the go or in a car. (Note: This thermal printer is compatible exclusively with A4 thermal paper and does not accept ordinary copy paper)
- Gift-Ready - This portable printer, a gift for pros & students, works as a thermal printer for classroom, classroom printer for teachers, printer for college student, small classroom printer, printer for dorm room, thermal printer for teachers, and portable printer for classroom. It combines thermal & inkless, ideal for notaries, truckers, teachers, parents. Package: D90E Printer, USB-C Cable, 10-sheet Paper, Travel Case, Guide. (Charging adapter not included.)
- How to solve paper jams: 1) Click once to pop up the paper - If the machine gets a paper jam, simply press the power button and the machine will automatically eject the paper. 2) Do not forcefully open the machine cover as it may cause injury or scratches . 3) Choose our flat thermal paper to avoid curling of the paper after printing. Note: Cannot use regular paper for printing
-
Check background colors and graphics; use
printBackground: trueif they should be included.Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Compare the rendered PDF’s dimensions and pagination with the report’s requirements. Site-specific print styles may change the result.
Use Chrome Headless from the command line
Chrome Headless supports command-line screenshot and PDF capture. Its reference documents the --screenshot and --print-to-pdf options, as well as a timeout option that determines when capture proceeds if content is still loading. Consult the Chrome Headless command-line reference for current command syntax and options.
A timeout only controls how long Chrome waits; it does not guarantee that every site’s asynchronous content is ready. If the target renders content after scripts run or after user interaction, use browser automation that can wait for the needed condition, then inspect the output.
Choose the right sizing controls
-
For an image: set the browser viewport for viewport capture, select an element for a targeted image, or enable full-page capture for the scrollable page. The resulting raster image can later be scaled in a report, but the screenshot itself does not define physical paper dimensions.
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 problemsSpecial offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.Rank #4
Rongta Thermal Portable Printers Wireless for Travel, Bluetooth Mobile Printer, Inkless Printer for School/Office/Home Use, Compatible with Android,iOS & Laptop(Black)- Easy to Set Up: RONGTA F11A portable thermal printer for travel go by bluetooth.Download "RONGTA" APP from Google Play or APP store for iOS and Android Phone or tablet.Connect the printer via bluetooth in the App, choose the F11A and make a Bluetooth connection in the APP, then it can easily print from your iPhone, iPad, or Android mobile, tablet.The inkless portable printer supports USB cable connection for Laptops,compatible with Windows 7-11 and MacOs for PC.
- RONGTA portable printer, 203DPI resolution, large to 8.5" design, easy to use and maintain. Print forms, letters, assignments, study materials, and travel documents hassle-free with advanced thermal technology. Ideal for printing outdoor, meeting office, or at home.
- Stylish Thermal Printer:Rongta bluetooth wireless printer, It is compatible with your go-to paper sizes—including US Letter, Legal, A4 thermal papers. What’s more, it requires no ribbons or ink cartridges at all. Designed for hassle-free home and travel use, it combines portability, versatility, and ultra-low operating costs in one sleek device.
- Portable and Compact: When traveling you can take Rongta portable printer wireless in your backpack or tote bag wherever you need. It is compact and portable whether in office home or on business trips,or any outdoor occations. Print contracts,office documents,inventory lists,or study materials for school.
- Warm Tips: Do Not Support Chrome. Rongta portable printers wireless for travel can't support pair bluetooth via Phone or tablet directly, must be pair on the"RONGTA" APP. Download APP, then turn on app make a Bluetooth connection. Please use thermal paper, do not support normal paper.
-
For a PDF: set the PDF’s width and height or choose a named paper format, then account for margins, scaling, print CSS, and page breaks.
-
For site-controlled print layout: inspect the page’s
@pagerules and usepreferCSSPageSizeonly when those rules should take precedence.
Troubleshooting capture problems
The PDF is the wrong size
Check the width and height units, then check whether the page defines a CSS @page size. If preferCSSPageSize: true is enabled, that CSS size takes priority over the API’s dimensions. If you want the API dimensions to govern, remove the option and inspect the rendered output.
Content is missing or cut off
Confirm whether you intended a viewport image or full-page image. For PDF output, inspect print-specific page breaks, margins, and scaling. A full-page image and a multi-page PDF have different layout behavior; use the one suited to the report.
The capture contains a loading state or blank section
Give the page time to load and wait for a meaningful condition rather than relying on a fixed timeout alone. For a dynamic page, Playwright can wait for a selector before capture:
Best Value
- Inkless Printing – Gloryang portable printer uses advanced thermal technology, requiring no ink, toner, or ribbons. The package includes the printer, 3 thermal paper rolls (1 pre-installed + 2 extras), a carrying case, charging cable, manual, and guide card. Cost-effective and easy to use. Note: Only compatible with Gloryang thermal paper; not for regular, inkjet, or plain paper.
- Seamless Bluetooth Connectivity – The Gloryang mobile sticker printer connects easily to iOS and Android via Bluetooth through the “Jadens Printer” app. It also works as a compact printer for laptops and computers—simply turn on the printer first, then install the driver to set up. Print anytime, anywhere.
- Ultra-Portable Design - Weighing just 1.75lb and measuring 1.7in thick, the Gloryang portable printer is incredibly lightweight and compact. Perfect for on-the-go printing during travels, work, or university, it easily fits into backpacks or briefcases. Ideal for emergency scenarios, contracts, office documents, and more.
- Space-Saving Design - Say goodbye to clutter with the built-in paper bin of the Gloryang printer. It saves space and keeps your workspace tidy, whether you're on the go or in a car. With two ways to load thermal paper and the ability to print documents ranging from 2 to 8.5 inches, it caters to various printing needs.
- Perfect Gift for Holiday-Gloryang thermal printer can print clear photos, image, design drawings and text. It's perfect for busy professionals and students. Come with a nice case, making it as a perfect Christmas and new year gift for your families and friends.
await page.goto('https://example.com', { waitUntil: 'domcontentloaded', timeout: 60000 });
await page.locator('.report-summary').waitFor({ state: 'visible', timeout: 30000 });
await page.screenshot({ path: 'summary.png' });
Replace the selector with an element that appears when the needed content is ready. A site may load further content asynchronously even after navigation completes.
Backgrounds or colors differ in the PDF
PDF output follows print media styles, which may differ from the normal screen view. Set printBackground: true when backgrounds should print, and review the site’s print CSS if the layout or colors remain different.
Or skip the browser setup
ScreenshotNeo provides a screenshot API and MCP server. Its endpoint can return an image or PDF from one GET request; use the API’s PDF options when you need a PDF, and check the documentation for supported parameters and behavior. Cookie banners are accepted like a visitor and removed, along with known newsletter popups and chat widgets, before capture; those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed. Its MCP server gives AI agents tools to take screenshots, get page information, and capture PDFs. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. See the ScreenshotNeo API documentation.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
Get 1,000 free screenshots a month with no card.
Frequently asked questions
Can I give a PNG screenshot a paper size?
Not as an intrinsic page dimension. A PNG has pixel dimensions; set how large it appears when you place it in a report or use PDF print output for defined paper dimensions.
Can I use a named paper format instead of width and height?
Yes. Playwright’s PDF API documents named formats including A4 and Letter, as well as explicit width and height values.
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.




