Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Use Puppeteer to complete the web app’s supported login flow, verify that the protected page has loaded, then call page.pdf(). A web form login is different from HTTP authentication: page.authenticate() does not fill in a site’s login form. The example below shows the overall sequence, but its selectors and post-login checks must be adapted to the app.
What you need to know before you start
Install Puppeteer in a Node.js project and use credentials you are authorized to use. The login page, form selectors, and reliable signal that login succeeded are specific to the app. Some apps use single-page routing, delayed API rendering, multi-factor authentication (MFA), CAPTCHA, or single sign-on (SSO), so a generic script cannot safely assume that submitting a form is enough.
The example is an illustrative pattern, not a tested recipe for a particular service. Use the authentication method that matches the application, and confirm the target page is showing its protected content before saving a PDF.
Log in, open the protected page, and save the PDF
Replace the example host, selectors, and readiness checks with those used by your app. The example assumes a form submission causes navigation and that networkidle2 is a suitable wait condition for the report. Neither assumption is universal.
#1 Best Overall
- PORTABLE SCANNER FOR USE ON-THE-GO — The fastest and lightest mobile single-sheet-fed compact document scanner in its class¹
- QUICK DOCUMENT SCANNING ― This Epson ultra-fast scanner scans a single page as quickly as 5.5 seconds²; Windows and Mac compatible
- VERSATILE PAPER HANDLING ― Portable scanner scans documents up to 8.5 x 72 in; Also easily digitizes receipts and ID cards to make accounting, bookkeeping, and organizing simpler
- INTUITIVE, HIGH-SPEED SOFTWARE — Epson ScanSmart Software³ is a smart tool allowing you to easily scan, review, and save; Stay organized easily with the help of this Epson scanner
- EASY SETUP — USB-powered connect to your computer for quick and simple scanning; No batteries or external power supply required to operate portable document scanner; Standard Connectivity: USB 2.0
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.goto('https://app.example.com/login', {
waitUntil: 'domcontentloaded',
});
await page.locator('input[name="username"]').fill(process.env.APP_USERNAME);
await page.locator('input[name="password"]').fill(process.env.APP_PASSWORD);
await Promise.all([
page.waitForNavigation(),
page.locator('button[type="submit"]').click(),
]);
// Replace this URL and readiness condition with the app's real ones.
await page.goto('https://app.example.com/report', {
waitUntil: 'networkidle2',
});
// Add an app-specific check here to confirm the expected report is visible.
await page.pdf({
path: 'report.pdf',
format: 'A4',
printBackground: true,
});
} finally {
await browser.close();
}
Set APP_USERNAME and APP_PASSWORD in the environment that runs the script; do not put real credentials directly in source code. The code uses Puppeteer’s locator API, so check it against the Puppeteer version installed in your project. Current API documentation surfaced for version 25.12.0, while the PDF and cookie guides cited here are under the next documentation path; examples and APIs can change between versions.
Adapt the login wait to the app
waitForNavigation() is appropriate only when submitting the form triggers a navigation. If the app logs in through client-side code without navigating, wait instead for an app-specific success element or another dependable indicator. Do not proceed merely because the click completed: verify the authenticated state and confirm that the target page contains the expected content. If a redirect returns you to the login page, troubleshoot authentication before generating the PDF.
Rank #2
- FAST SPEEDS - Scans color and black and white documents a blazing speed up to 16ppm (1). Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
- ULTRA COMPACT – At less than 1 foot in length and only about 1. 5lbs in weight you can fit this device virtually anywhere (a bag, a purse, even a pocket).
- READY WHENEVER YOU ARE – The DS-640 mobile scanner is powered via an included micro USB 3. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan.
- WORKS YOUR WAY – Use the Brother free iPrint&Scan desktop app for scanning to multiple “Scan-to” destinations like PC, Network, cloud services, Email and OCR. (2) Supports Windows, Mac and Linux and TWAIN/WIA for PC/ICA for Mac/SANE drivers. (3)
- OPTIMIZE IMAGES AND TEXT – Automatic color detection/adjustment, image rotation (PC only), bleed through prevention/background removal, text enhancement, color drop to enhance scans. Software suite includes document management and OCR software. (4)
Handle credentials and sessions carefully
Avoid printing credentials to logs or storing session cookies insecurely. Cookie restoration is an option for an already authenticated session, but it works only when the app accepts those cookies and their domain, path, expiry, secure attributes, and other session requirements match. Puppeteer documents cookie operations and examples for storing and restoring cookies; it does not guarantee that any particular app can be authenticated with cookies alone. See the Puppeteer cookies guide and Browser.setCookie() reference.
Choose the authentication method the app supports
| Method | Use it when | Important qualification |
|---|---|---|
page.authenticate({ username, password }) |
The server uses HTTP authentication, such as a supported Basic or Digest-style challenge. | It is not a general web-form login helper. Puppeteer says it enables request interception behind the scenes, which may affect performance. See Page.authenticate(). |
| Interactive app login | The app provides a login page and form or another browser-based sign-in flow. | Use the app’s actual controls and success condition. MFA, CAPTCHA, SSO, and client-side routing may require app-specific handling. |
| Existing browser-context cookies | You have a valid session that the app recognizes and want to restore it. | Cookie scope, expiry, security attributes, and any additional session mechanism must be compatible with the app. Cookie APIs do not bypass the app’s authentication design. |
Set PDF size, styling, and page range
page.pdf() renders using print CSS media by default. If the page should use its screen styling instead, call await page.emulateMediaType('screen') before page.pdf(). The Page API documents this behavior at Page class; the official PDF generation guide demonstrates saving a PDF by supplying a path.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
- STAY ORGANIZED – Easily convert your paper documents into digital formats like searchable PDF files, JPEGs, and more.Power Consumption : 2.5W or less (Energy Saving Mode: 0.7W). Suggested Daily Volume : 500 scans..Does it contain liquid: no
- CONVENIENT AND PORTABLE –lightweight and small in size, you can take the scanner anywhere from home offices, classrooms, remote offices, and anywhere in between
- HANDLES VARIOUS MEDIA TYPES – Digitize receipts, business cards, plastic or embossed cards, reports, legal documents, and more
- FAST AND EFFICIENT – No technical hurdles or complicated setups here; easily scan both sides of a document at the same time, in color or black-and-white, at up to 12 pages-per-minute, and with a 20 sheet automatic feeder
- BROAD COMPATIBILITY – Works with both Windows and Mac devices, be it laptop or computer
| Option or setting | What it controls | Documented behavior |
|---|---|---|
path |
Output file location | Writes the PDF to the requested path. Relative paths are resolved from the current working directory. |
format |
Paper format | The documented default is letter. If set, it takes precedence over width and height. |
margin |
Page margins | If omitted, no margins are set. |
printBackground |
Background graphics | Defaults to false; set it to true to include backgrounds. |
pageRanges |
Pages to include | Defaults to all pages. A range can look like 1-5, 8. |
preferCSSPageSize |
Whether CSS @page controls page sizing |
Defaults to scaling content to fit the configured paper size; enable it to give CSS page size priority. |
waitForFonts |
Font readiness before capture | Defaults to true. |
timeout |
PDF operation timeout | Defaults to 30,000 ms. Setting it to 0 disables the timeout. |
These defaults and options are documented in the PDFOptions interface. Print output can also alter colors; CSS -webkit-print-color-adjust can request exact colors when the page’s styles support it.
Or skip the browser setup
ScreenshotNeo can return a PDF with one request, without writing a Puppeteer login flow. Its PDF options include paper size, margins, landscape, and page ranges. This is useful for pages that do not require signing in; the request below does not authenticate to a protected web app.
Rank #4
- IRIScan Express, portable scanner : scans color and black and white documents a blazing speed up to 8ppm simplex. Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
- IRIScan Express mobile scanner is powered via an included micro USB 2. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan. USB cable provided. AC Adapter not provided and not needed.
- IRIScan flatbed scanner uses a simplex scanning mode allows for quick and straightforward scanning of single-sided documents. IRIScan with its full portable features is the ideal document scanners for computers.
- IRIScan document scanner : Versatile scanning capabilities, including scanning to Word, PDF, and Excel formats with companion software provided Readiris OCR
- Receipt scanner and card scanner with Additional features include scanning business cards directly to Outlook, photo scanning, and receipt scanning for efficient document management
Install the HTTP client with python -m pip install requests, set SCREENSHOTNEO_API_KEY to your API key, and run this Python example:
import os
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={
"access_key": os.environ["SCREENSHOTNEO_API_KEY"],
"url": "https://stripe.com",
"format": "pdf",
},
timeout=90,
)
r.raise_for_status()
with open("page.pdf", "wb") as f:
f.write(r.content)
See the ScreenshotNeo documentation for request options. It removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are not billed. Its MCP server gives AI agents tools to take screenshots, inspect page information, and capture PDFs. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo’s free plan.
Troubleshoot common failures
- The PDF contains the login page. Authentication did not complete, the target URL redirected, or the script moved on before the app finished rendering. Check the final URL and an app-specific authenticated-state indicator before calling
page.pdf(). waitForNavigation()does not resolve or times out. The login may be handled without a full navigation. Wait for a success element or another condition that reflects the app’s actual behavior instead.- The report is blank or incomplete. Navigation readiness does not always mean the report’s data has rendered. Wait for a report-specific selector or a known rendering condition before creating the PDF.
- Colors, backgrounds, or layout differ from the browser view. PDF generation uses print media by default. Use
emulateMediaType('screen')for screen styling, enableprintBackgroundfor backgrounds, or adjust the page’s print CSS. - The output file is not where expected. Check the path passed as
path; a relative path is resolved from the process’s current working directory. - PDF creation times out. The documented default timeout is 30,000 ms. Check that the page and fonts finish loading; if a longer wait is appropriate, adjust the PDF timeout. Setting it to
0disables the timeout, but removes that limit rather than fixing a stalled page.
Performance and reliability considerations
Use a readiness condition tied to the content you need rather than assuming that login, navigation, or network idleness proves a report is complete. HTTP authentication specifically enables request interception according to Puppeteer’s documentation and may affect performance. For reliability, make the script fail visibly when the authenticated page is not the expected one instead of saving an error or login screen as if it were the requested report.
Best Value
- Scanner type: Document
- Connectivity technology: USB
- With Auto Scan Mode, the scanner automatically detects what you're scanning
- Digitize documents and images
PDF size and appearance depend on the page’s print styles, chosen paper dimensions, margins, and whether backgrounds are included. Narrowing the page range can reduce what is included in the output, but the documentation does not establish a general runtime or file-size improvement for a given setting. Check the generated PDF for the specific app and content you need.
Frequently asked questions
Can Puppeteer save a PDF from a page after login?
Yes, if the script authenticates successfully and the target page is available to that session. Then use page.pdf() after verifying the relevant content has rendered.
Does page.authenticate() log into a normal website account?
No. It is for HTTP authentication, not for filling out a web app’s login form.
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 matchWindows 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 reinstallCan I save only selected PDF pages?
Yes. Set the PDF pageRanges option, for example 1-5, 8.
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.

