PC 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 & 11Outdated 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 matchHeadless Chrome can print a webpage to PDF, and Puppeteer can upload a local PDF through a webpage’s file input. Those are separate operations: to print the website’s result after an upload, upload the file, wait for that site to finish processing it, then call Puppeteer’s page.pdf(). That output is the page’s print rendering, not necessarily a copy of the uploaded PDF.
Choose the workflow that matches your input
| Your starting point | Use this method | What the PDF contains |
|---|---|---|
| A URL already displays the page you want | Chrome’s --headless --print-to-pdf command |
A PDF of the target page’s rendered output. |
| A local PDF must be selected in a website’s file input | Puppeteer file upload, site-specific processing wait, then page.pdf() |
A PDF of the website’s print-rendered page after processing. The site determines what it displays or produces from the upload. |
If you need an unchanged, byte-for-byte copy of a local PDF, neither printing a webpage nor uploading a file and printing the resulting page establishes that outcome. The site’s processing behavior and the intended output must be known.
As an Amazon Associate I earn from qualifying purchases.
Print a page directly with Chrome’s headless command line
When the page is already available at a URL, Chrome can print it without an upload step:
chrome --headless --print-to-pdf https://example.com/
Chrome saves the PDF as output.pdf in the current working directory. To omit Chrome’s generated header and footer, add --no-pdf-header-footer:
#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
chrome --headless --print-to-pdf --no-pdf-header-footer https://example.com/
For a page that needs more time before printing, the command-line reference documents --timeout=5000. For JavaScript driven by timers, it also documents --virtual-time-budget to advance virtual time before capture. These options do not prove that all application work has finished; choose timing based on the page and inspect the output.
The newer --no-pdf-header-footer option supersedes the older --print-to-pdf-no-header name. Older Chrome versions may require the earlier flag. The CLI reference says --allow-chrome-scheme-url is required to access chrome:// URLs and is available from Chrome 123.
Upload a local PDF and print the processed page with Puppeteer
Puppeteer’s file-input workflow and PDF generation are separate steps. Find the file input, upload an absolute local path, wait for an application-specific signal that processing is complete, and then print the page. Install Puppeteer in your project and adapt the URL, selector, and completion condition to the actual site:
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →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⁴
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({ headless: true });
try {
const page = await browser.newPage();
await page.goto('https://example.com/upload', { waitUntil: 'domcontentloaded' });
const fileElement = await page.waitForSelector('input[type="file"]');
await fileElement.uploadFile(['/absolute/path/input.pdf']);
// Replace this with a real, site-specific completion signal.
await page.waitForSelector('.processing-complete');
await page.pdf({ path: 'output.pdf' });
} finally {
await browser.close();
}
})();
Use the site’s real completion state: for example, a result panel, a completed status, or a preview that appears only after conversion. The example selector .processing-complete is illustrative, not a built-in Puppeteer signal. If the site requires a submit button after file selection, click it before waiting for completion.
page.pdf() generates a PDF using print CSS media by default. It prints the page’s print rendering; it does not promise to preserve the uploaded file’s original bytes, layout, or metadata. Puppeteer’s file guide also notes that it does not currently provide programmatic handling for file downloads. If the desired artifact is the page’s print rendering, generating it directly with page.pdf() avoids relying on a browser download.
Headless mode and compatibility
Chrome’s current Headless mode shares its implementation with headful Chrome. The older Headless implementation is available separately as chrome-headless-shell; Puppeteer can select it with headless: 'shell', while headless: true enables modern Headless. Prefer the documentation matching your installed Chrome and Puppeteer versions when older examples or flag names behave differently.
Rank #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.
Chrome describes Headless as running “in an unattended environment, without any visible UI.” That describes the mode, not the readiness of a particular site: your script still needs to wait for the site’s upload processing to finish before printing.
Troubleshooting
- The output is the upload page, not the converted document. The script may have printed before processing finished, or the site may display a preview or result in a different element. Wait for the site’s actual completion state and confirm what it renders before calling
page.pdf(). waitForSelectortimes out. The selector may not exist on that site, may appear under a different state, or the page may not have reached it. Inspect the page’s actual DOM and use a selector tied to a visible completed result rather than copying the example selector unchanged.- The file does not upload. Confirm the selector identifies the intended
input[type="file"], the file path is absolute, and the file is accessible to the process running Puppeteer. If the application requires a separate submit action, automate it after selection. - The output has unwanted browser headers or footers. For the Chrome CLI route, use
--no-pdf-header-footeron versions that support it; older versions may use--print-to-pdf-no-header. - A timer-driven page is captured too early. The CLI supports
--timeoutand--virtual-time-budget, but a fixed delay is not a universal signal that application work is done. In Puppeteer, prefer a page-specific completed state. - A
chrome://page cannot be printed. Chrome’s CLI reference requires--allow-chrome-scheme-urlfor these URLs and specifies availability from Chrome 123.
Or skip the browser setup
If your goal is to capture a webpage as an image or PDF rather than upload a local PDF to a site, ScreenshotNeo offers a one-request screenshot API. It does not replace the upload-and-process workflow described above.
For a webpage capture, the cURL example is:
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 API documentation for request options. It can accept cookie or consent banners and remove known consent platforms, newsletter popups, and chat widgets before capture. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed; response headers identify the page verdict and billing status. Its MCP server provides screenshot and PDF-capture tools for AI agents. The free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.
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
Frequently Asked Questions
Does --print-to-pdf convert an uploaded PDF file?
No. Chrome’s documented command prints a target page. Uploading a PDF through a website is a separate operation, and the site controls what it renders from that file.
Does Puppeteer’s page.pdf() preserve the uploaded PDF unchanged?
Not necessarily. It generates a PDF of the webpage’s print rendering, using print CSS media by default.
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.




