Recommended Free Tools
Use Puppeteer’s page.pdf() method to save a rendered web page as a PDF. By default it uses print CSS and Letter paper; set options such as format, margin and printBackground to control the output.
Generate a PDF from a web page
Install Puppeteer in your project, then launch its browser, navigate to the page and call page.pdf(). This runnable example writes a PDF to page.pdf:
As an Amazon Associate I earn from qualifying purchases.
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle2' });
await page.pdf({ path: 'page.pdf' });
} finally {
await browser.close();
}
})();
Replace the URL and filename with your own. The official guide uses networkidle2 in its example, but network quiet is not proof that every site’s delayed or asynchronous content has finished loading. Select a navigation condition that fits the page and explicitly wait for a relevant selector or application state when necessary. Puppeteer waits for fonts by default before producing the PDF.
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 →page.pdf() returns a promise for PDF bytes. Supplying path writes the file; omitting it returns the bytes for your application to store or send. See the Page.pdf() API reference and the PDF generation guide.
#1 Best Overall
- 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)
Choose print or screen styling
PDF generation uses the print CSS media type by default. This lets print-specific rules, such as @media print, affect the document. If you want the page’s screen styles instead, set the media type before generating the PDF:
await page.emulateMediaType('screen');
await page.pdf({ path: 'page.pdf' });
Pick the media type based on the intended document: print styles are usually better for paper-like output, while screen styles may preserve a site’s on-screen layout. The result still depends on the page’s CSS and content.
Rank #2
- 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
Set paper size, margins and orientation
The PDFOptions interface lets you choose a named paper format or explicit dimensions, set orientation and margins, and select page ranges. Letter is the default format; scale defaults to 1 and accepts values from 0.1 to 2.
Free tools Windows power users keep installed
One-click scans. No signup required.
await page.pdf({
path: 'report.pdf',
format: 'A4',
landscape: true,
margin: {
top: '12mm',
right: '12mm',
bottom: '16mm',
left: '12mm'
},
printBackground: true
});
Use width and height for custom dimensions instead of a named format when that better matches your output. If format is set, it takes priority over width and height. The preferCSSPageSize option defaults to false; set it to true when the page’s CSS @page size should take priority over the dimensions or format supplied in the API options.
Rank #3
- 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.
For a specific portion of a long document, set pageRanges to the pages you need. The full options and defaults are documented in the PDFOptions API reference.
Control backgrounds, colors and headers
Background graphics are omitted by default. Set printBackground: true when backgrounds are part of the design. Puppeteer also modifies colors for printing by default; for CSS color fidelity, the documentation points to -webkit-print-color-adjust, which you can apply in your stylesheet:
Rank #4
- 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
@media print {
body {
-webkit-print-color-adjust: exact;
}
}
Other PDF controls include omitBackground, timeout and waitForFonts. To add page headers or footers, enable displayHeaderFooter and provide headerTemplate and footerTemplate. Templates can use special classes for the date, title, URL, page number and total pages. Consult the PDFOptions reference for accepted option names and behavior.
Common output problems and fixes
- The PDF looks like a print layout rather than the browser view: This is the default print media behavior. Call
page.emulateMediaType('screen')beforepage.pdf()if screen CSS is what you want. - Background colors or images are missing: Set
printBackground: true. - The page has the wrong paper dimensions: Check whether
formatoverrides yourwidthandheight. If CSS@pagesizing should win, enablepreferCSSPageSize. - Some page content is absent: Do not assume a navigation wait condition guarantees that dynamic content is ready. Wait for the content your page needs before calling
page.pdf(). - The PDF was not saved where expected: Confirm the
pathis correct and writable. If you omitpath, handle the returned PDF bytes instead of expecting a file. - Fonts appear not to have finished loading: Puppeteer waits for fonts by default. Check whether the page’s fonts load successfully and whether its content is ready before PDF generation.
Or skip the browser setup
For a one-request PDF capture, ScreenshotNeo accepts a URL and returns a PDF. Its API and options are documented at ScreenshotNeo docs. This cURL example saves a PDF:
Best Value
- 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
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o page.pdf
ScreenshotNeo removes cookie banners, newsletter popups and chat widgets before capture. Bot checks, blank pages and failed loads are never billed, and an MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month with no card.
Frequently Asked Questions
Does Puppeteer save a PDF if I omit the path option?
No file is written automatically; page.pdf() returns PDF bytes that your code can handle.
Can Puppeteer print only selected PDF pages?
Yes. Set the pageRanges option in page.pdf() to select pages.
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 →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.




