To save one webpage as a PDF, open it in a browser and use its print-to-PDF option. To automate URL-to-PDF conversion, Chrome Headless can write a PDF from the command line, while Puppeteer lets a JavaScript program control navigation and PDF layout. The right method depends on whether you need a one-off copy, a repeatable command, or a workflow with control over page readiness and print settings.
Choose the right way to turn a URL into a PDF
| Method | Best for | Input | Layout control |
|---|---|---|---|
| Browser print dialog | An occasional manual save | A page open in your browser | Options in the browser’s print dialog |
| Chrome Headless | A simple command-line conversion | A URL passed to Chrome | Command-line flags, including header/footer and timing controls |
| Puppeteer | Repeatable JavaScript automation | A URL navigated to by code | PDF options, print CSS, and navigation handling |
All three methods render a webpage; they do not guarantee that every site will produce a complete or identical PDF. Authentication, page scripts, delayed resources, print styles, and site-specific behavior can change the result. For one file, try the browser first. For an automated job, use Chrome Headless or Puppeteer and check the resulting PDF.
Save a webpage as a PDF in a browser
For a one-time copy, open the page and use the browser’s print function, then choose its PDF-saving destination instead of a physical printer. The exact menu labels and steps vary by browser, operating system, and version, so check the help for the browser you are using if you cannot find the print or PDF option. This approach needs no script or command-line setup, but it is manual and its layout controls depend on the print dialog.
Before saving, check the print preview. It can reveal clipped content, unexpected page breaks, or headers and footers. If the page relies on content that appears only after scripts or user interaction, confirm that it has finished loading and that the content is visible before printing.
Recommended Free Tools
#1 Best Overall
- INNOVATIVE CARTRIDGE-FREE PRINTING — No more dealing with lots of tiny ink cartridges; With this wireless document and photo printer each ink bottle set is equivalent to about 90 individual cartridges²
- LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; When you choose this combination printer, scanner and copier you can print up to 4,500 pages black/7,500 color³
- COLOR PRINTING — Up to 2 years of ink in the box4 (and with every replacement ink set) for fewer out-of-ink frustrations
- ZERO CARTRIDGE WASTE — By using an Epson EcoTank printer you can help reduce the amount of cartridge waste ending up in landfills
- HOME PRINTER DESIGNED FOR RELIABILITY — The Epson EcoTank ET-2800 All-in-One Supertank Color Printer creates vivid, detailed prints and documents thanks to Micro Piezo Heat-Free Technology; Fire off 10 ISO pages per minute1 to easily finish large jobs
Generate a PDF from a URL with Chrome Headless
Chrome’s Headless command-line reference documents --print-to-pdf for saving a target page as output.pdf in the current working directory. Run:
chrome --headless --print-to-pdf https://example.com/
Use the Chrome executable name or path that applies to your installation. The command assumes Chrome is available to your shell under the name chrome; if it is not, invoke the installed executable by its full path. The output file is written in the working directory unless you give the command an output path supported by your Chrome version.
Omit the generated print header and footer
Chrome’s PDF output includes a print header and footer by default, with the current date and time, URL, and page number. To omit them, add --no-pdf-header-footer:
chrome --headless --no-pdf-header-footer --print-to-pdf https://example.com/
Chrome’s reference notes that the no-header functionality was previously available as --print-to-pdf-no-header. If the current spelling is rejected by an older Chrome installation, check the documentation for that installed version and try its legacy flag.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Set a maximum wait for loading
The --timeout flag sets a maximum wait before capture, even if the page is still loading. It is a limit on waiting, not proof that every image, script, or asynchronous request has completed. A short timeout can capture an incomplete page; a longer one may increase the time each conversion takes without fixing a site that never becomes ready.
Handle timer-driven page content
--virtual-time-budget fast-forwards timer-driven code. It can help when a page uses timers to reveal content, but it is not a general guarantee that all asynchronous work is done. Test the output on the actual target pages and choose timing controls based on the site’s behavior.
Rank #2
- CARTRIDGE-FREE PRINTING — Print lab-quality photos, graphics and creative projects; Get vibrant colors and sharp text with Epson's high-accuracy printhead and Claria ET Premium 6-color inks
- INK BOTTLES — Save on photos1 and creative projects with affordable in-house printing; All-in-one printer allows you to print 4" x 6" photos for about 4 cents each vs. 40 cents with traditional ink cartridges1
- LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; Printer, scanner and copier lets you print up to 6,200 color pages³
- PRINT FOR LONGER — Up to 2 years of ink in the box² (and with every replacement ink set) for fewer out-of-ink frustrations with this wireless printer
- ZERO CARTRIDGE WASTE — Epson EcoTank printer helps reduce the amount of cartridge waste ending up in landfills; Cartridge-free printer uses high-yield ink bottles; Each replacement ink bottle set is equivalent to about 100 individual ink cartridges⁴
Generate a PDF with Puppeteer
Puppeteer is a JavaScript browser-automation library. Its official guide demonstrates launching a browser, navigating to a URL, and using page.pdf() to save the PDF. Install Puppeteer in your project using its documented installation instructions, then use this example in a JavaScript file:
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: 'output.pdf' });
} finally {
await browser.close();
}
})();
The guide’s example uses networkidle2 as its navigation wait choice. Treat that as one option, not a universal readiness test: some pages keep network requests open, load content later, or need a user action before rendering the material you want. The guide also says Page.pdf() waits for fonts to load by default. Navigation completion and font readiness are separate considerations when investigating incomplete output.
Free tools Windows power users keep installed
One-click scans. No signup required.
Choose whether the PDF uses print or screen styles
Page.pdf() renders with the CSS print media type by default. This means the page’s print-specific rules, including @media print, can determine what appears. If you need the page’s screen styles instead, emulate the screen media type before calling page.pdf():
await page.emulateMediaType('screen');
await page.pdf({ path: 'output.pdf' });
That changes the media type used for rendering; it does not guarantee the screen layout will fit the chosen paper size. Review the PDF for clipping, awkward page breaks, and elements positioned outside the printable area.
Set page size, margins, orientation, and other PDF options
Puppeteer’s PDF options let you control paper format, landscape orientation, margins, page ranges, scaling, background graphics, output path, and whether CSS @page size declarations take priority. For example, to set common options in code:
await page.pdf({
path: 'output.pdf',
format: 'A4',
landscape: false,
printBackground: true,
margin: {
top: '12mm',
right: '12mm',
bottom: '12mm',
left: '12mm',
},
});
These values illustrate how to express options; choose the paper format and margins appropriate for your document. Background graphics are not the same as forcing exact color reproduction. Puppeteer’s documentation points to the CSS property -webkit-print-color-adjust for forcing exact colors, but the page’s own styles and rendering still affect the result.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesRank #3
- SET IT UP ONCE AND PRINT WITH CONFIDENCE. No complicated maintenance. Just easy, reliable printing you can count on.
- INK FOR YEARS. NOT MONTHS. Up to 2 years of ink included. Get thousands of pages of cartridge-free printing. More pages, less hassle
- KEEPS PRINTING WELL AFTER COMPETITORS HAVE QUIT. No complex maintenance. Sharper text, richer colors.[2] Only with HP Smart Tank
- PREMIUM SUPPORT - Strong technical expertise to solve issues faster
- THE LAST PRINTER YOU'LL EVER NEED. Enjoy years of refillable, cartridge-free printing.
The tagged PDF option is documented as experimental. Do not assume that enabling it makes a PDF accessible or correctly tagged; inspect the generated document and verify it against your accessibility requirements.
Choose settings based on the result you need
- For a clean document without browser-generated details: use Chrome Headless’s documented no-header/footer flag, or configure print settings in Puppeteer.
- For content visible only in print: keep Puppeteer’s default print media type and inspect how the site’s print CSS changes the page.
- For screen-like styling: use
page.emulateMediaType('screen')before generating the PDF, then check that the content fits on paper. - For a consistent paper layout: set paper size, orientation, margins, scaling, page ranges, and background behavior deliberately instead of relying on defaults.
- For delayed or script-rendered content: choose a readiness strategy appropriate to the site, then inspect the output; neither a timeout nor a network-idle condition guarantees completeness for every page.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. It can return a screenshot or PDF from a URL. One GET request can capture a page without installing or managing a local browser. The API can accept cookie and consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in its headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.
The following cURL example requests a capture for a URL; see the ScreenshotNeo documentation for PDF output settings and the API’s other parameters:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
The example saves a WebP file as written; it is not a PDF-specific command. For PDF output, use the PDF options documented by ScreenshotNeo rather than assuming an undocumented parameter. ScreenshotNeo’s listed plans include 1,000 shots per month free with no card, and paid plans start at $5 for 3,000 shots. Sign up for free and try 1,000 screenshots a month with no card.
Troubleshooting URL-to-PDF conversion
The command says Chrome is not found
Your shell cannot find an executable named chrome. Use the installed Chrome executable’s full path or configure the appropriate executable path for your environment. The command-line example only works as written when that executable name is available.
The PDF is missing content or shows a loading state
The capture may have occurred before the page finished rendering the content. With Chrome Headless, review the timeout and virtual-time controls; with Puppeteer, review the navigation wait choice and whether the page needs additional readiness handling. These controls have limits: a longer wait is not a universal fix for asynchronous content, and virtual time does not guarantee every task completes.
The PDF has unexpected colors or styling
Puppeteer uses print CSS for PDFs by default, so inspect the site’s print rules. If you need screen styling, emulate the screen media type before calling page.pdf(). For print rendering where exact colors matter, review the page’s use of -webkit-print-color-adjust and inspect the generated document.
Rank #4
- 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
Headers, footers, or page breaks are wrong
Chrome’s generated print headers and footers can be removed with --no-pdf-header-footer on versions that support it. In Puppeteer, check margins, paper size, orientation, page ranges, scaling, and CSS @page size behavior. A page’s print styles can also alter pagination, so adjust the source page’s CSS when you control it.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows 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 reinstallFonts are missing or look different
Puppeteer’s documented PDF method waits for fonts by default, but that does not establish that every font resource is available or that the page has finished all other rendering work. Check font loading and the page’s network access as well as navigation readiness.
A legacy Chrome flag is rejected
Chrome’s headless reference says the no-header functionality was formerly named --print-to-pdf-no-header. The spelling accepted depends on the Chrome version; use the matching flag documented for the installed version.
Performance, reliability, and cost considerations
Browser-based printing avoids writing code but requires a person to open and save each page. Chrome Headless is a compact fit for a command-line job, while Puppeteer adds JavaScript control over navigation and PDF settings. Neither documentation reference supplies a universal speed or success rate, and a page’s behavior can dominate conversion time. Set waits intentionally, keep an eye on how long jobs take, and inspect representative output before processing many URLs.
For repeated jobs, account for the browser process and cleanup: the Puppeteer example closes the browser in a finally block so it is closed even if navigation or PDF generation fails. If a conversion is part of a larger service, also handle navigation or output errors in your own job logic and avoid treating a generated file alone as proof that it contains the intended page.
Frequently asked questions
Can I generate a PDF from a URL without installing a browser automation library?
Yes. For a manual conversion, use your browser’s print-to-PDF workflow. For a command-line conversion, Chrome Headless provides --print-to-pdf; Puppeteer is the option here when you need scripted JavaScript control.
Does Puppeteer create an accessible PDF automatically?
No such guarantee is established by the documented options. Puppeteer’s tagged option is experimental, so validate the resulting file rather than assuming it meets accessibility requirements.
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.




