Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteTo add headers and footers to a webpage PDF with Puppeteer, set displayHeaderFooter: true in page.pdf(), provide HTML in headerTemplate and/or footerTemplate, and set top and bottom margins so the document content does not overlap them. Puppeteer’s templates support special classes for the document title, URL, date, page number, and total page count. See the PDFOptions API.
Generate a webpage PDF with a header and footer
Here is a complete Node.js example using Puppeteer’s documented browser, page, navigation, and PDF workflow. Replace the URL with the page you want to print.
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: 'networkidle0' });
await page.pdf({
path: 'page.pdf',
format: 'A4',
displayHeaderFooter: true,
headerTemplate: `
<div style="font-size: 9px; width: 100%; text-align: center;">
<span class="title"></span>
</div>`,
footerTemplate: `
<div style="font-size: 9px; width: 100%; text-align: center;">
<span class="pageNumber"></span> / <span class="totalPages"></span>
</div>`,
margin: {
top: '0.7in',
bottom: '0.7in',
left: '0.5in',
right: '0.5in',
},
});
} finally {
await browser.close();
}
})();
The header displays the page title; the footer displays the current page and total page count. These margin values are an example, not a universal layout rule. Adjust them to suit the height of your template and the paper size. Puppeteer’s PDF generation guide covers the basic page-to-PDF flow.
Configure the templates and page numbers
Enable the running header or footer
displayHeaderFooter defaults to false. Set it to true or the templates will not appear. Supply headerTemplate, footerTemplate, or both as HTML strings. Use the header for content at the top of each printed page and the footer for content at the bottom.
#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
Use Puppeteer’s special template classes
Put the documented class names on elements in the template to have Puppeteer insert page metadata:
date— print date.title— document title.url— document URL.pageNumber— current page number.totalPages— total page count.
Use the class names exactly as shown, including capitalization. For example, page numbering belongs in template HTML as <span class="pageNumber"></span>; do not try to calculate the total in application JavaScript.
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)
Set paper size and margins deliberately
The PDFOptions reference lists Letter as the default format. If you set format, it takes priority over width and height. You can also set landscape, scale, and preferCSSPageSize; the latter prioritizes the page size declared by CSS @page rules. These options are documented in the PDFOptions API.
Free tools Windows power users keep installed
One-click scans. No signup required.
PDFOptions leaves margins undefined by default, which means no margins are set. Provide top and bottom margins to make room for the header and footer, then tune their sizes by inspecting the resulting PDF. Set left and right margins as needed for the document’s layout. The appropriate dimensions depend on your template height and chosen page format.
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
Account for print CSS and rendering behavior
page.pdf() generates the PDF using the print CSS media type. If the PDF should use screen styles instead, call await page.emulateMediaType('screen') before page.pdf(). If printed output differs from the browser view, inspect the page’s @media print and @page rules, as well as the PDF options controlling size and margins. The Page API documents the print-media behavior.
Puppeteer applies print-oriented color adjustments by default. If exact colors matter, review the documented -webkit-print-color-adjust property. The current PDF generation guide also says Page.pdf() waits for fonts by default. Check the output in the runtime and Chromium version you deploy; the API documentation does not promise identical rendering across operating systems or Chromium versions.
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
Troubleshoot missing or misplaced header and footer content
- Nothing appears: Confirm
displayHeaderFooter: trueand that the relevant template property contains HTML. - Header or footer overlaps page text: Increase the corresponding top or bottom margin. The default is no margins.
- Page number or title is blank: Check the exact class name, such as
pageNumber,totalPages, ortitle. - The PDF layout differs from the screen: By default, PDF generation uses print media. Review print-specific CSS or emulate screen media before generating the PDF.
- Colors differ from the page view: Puppeteer applies print color adjustments; review
-webkit-print-color-adjustwhere accurate print colors are needed. - Font appearance is unexpected: The guide says PDF generation waits for fonts by default. Inspect font loading and the final PDF in your target runtime.
Or skip the browser setup
If you need a screenshot or PDF through an API rather than managing Puppeteer yourself, ScreenshotNeo accepts a URL in one GET request. For example, this cURL request saves a PDF:
Recommended Free Tools
Quick Recap
Best Value
- Scanner type: Document
- Connectivity technology: USB
- With Auto Scan Mode, the scanner automatically detects what you're scanning
- Digitize documents and images
curl -G "https://api.screenshotneo.com/v1/shot"
-d access_key=YOUR_API_KEY
--data-urlencode url=https://example.com
-d format=pdf
-o page.pdf
See the ScreenshotNeo API documentation for request options. ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are not billed. Its MCP server lets AI agents use screenshot tools, and the Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for free.
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.

