Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
The right HTML-to-PDF tool depends on how you work. Use a browser’s Print command for a one-off page, Puppeteer when your application must generate repeatable PDFs, Acrobat when you need interactive conversion controls, a command-line engine for an existing deployment, or a hosted API when you do not want to operate browsers yourself. No available evidence establishes one universal winner, so choose by rendering control, accessibility, deployment, maintenance, and volume.
Choose a conversion route
| Route | Best fit | What it provides | Important qualification |
|---|---|---|---|
| Browser print dialog | Occasional, manual saves | Immediate page-size, orientation, margin and destination controls | Results depend on the browser, page print CSS and the user’s settings |
| Puppeteer | Repeatable generation in JavaScript or Node.js | Chromium rendering, print CSS, scripted waits and PDF options | No independent speed or fidelity benchmark is established here |
| Adobe Acrobat | Desktop users who need conversion controls | Layout, encoding, colors, bookmarks, tags, page size, orientation, margins and scaling | Operating workflow and licensing depend on your Acrobat edition |
| wkhtmltopdf | Existing command-line or server deployments | Headless Qt WebKit HTML-to-PDF/image conversion under LGPLv3 | The project page reviewed is old-crawled; current maintenance and modern CSS compatibility are not established |
| Hosted API | Applications that prefer an external conversion service | Remote HTML, URL, ZIP or dynamic-page conversion without browser operations in your infrastructure | Check current limits, privacy terms and regional availability before committing |
Convert HTML with Puppeteer
Puppeteer’s Page.pdf() method generates a PDF using the print CSS media type by default (Puppeteer API documentation). If your screen layout should be preserved instead, call page.emulateMediaType('screen') before creating the PDF. Chromium also modifies colors for printing by default, so explicitly preserve backgrounds when your design requires them.
Install and run a complete example
- Install Node.js and create a project:
mkdir html-pdf && cd html-pdf && npm init -y. - Install Puppeteer:
npm install puppeteer. - Save this as
convert.mjs, replacing the URL with a page you control or are authorized to retrieve. - Run
node convert.mjs; the result is written tooutput.pdf.
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch({
headless: true
});
try {
const page = await browser.newPage();
await page.setViewport({ width: 1440, height: 900, deviceScaleFactor: 1 });
await page.goto('https://example.com', {
waitUntil: 'networkidle2',
timeout: 90000
});
// Use this only when the screen stylesheet, not print CSS, is desired.
// await page.emulateMediaType('screen');
await page.evaluate(() => document.fonts.ready);
await page.pdf({
path: 'output.pdf',
format: 'A4',
printBackground: true,
margin: {
top: '16mm',
right: '16mm',
bottom: '18mm',
left: '16mm'
},
preferCSSPageSize: true,
displayHeaderFooter: false
});
} finally {
await browser.close();
}
The guide’s example uses networkidle2, but readiness is an application decision: analytics, advertisements or live sockets can keep a page active indefinitely. A page-specific selector wait or a short, bounded delay can be more reliable for dynamic content.
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 →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Control print layout with CSS
@media print {
.navigation, .cookie-banner, .chat-widget { display: none !important; }
a { color: #000; text-decoration: none; }
h1, h2, h3 { break-after: avoid; }
.invoice { break-inside: avoid; }
}
@page {
size: A4;
margin: 16mm;
}
preferCSSPageSize: true lets an author’s @page rule control the paper size. Without it, the PDF option such as format: 'A4' is the primary size setting. Use CSS page and break rules deliberately for invoices, reports and repeating sections.
#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
Fonts, images and dynamic content
- Puppeteer documents that font loading is awaited by default, and the example additionally waits on
document.fonts.readyso the intent is explicit. - Confirm that web fonts, images and CSS are reachable from the conversion environment. Relative assets should resolve from the page’s actual URL.
- For lazy-loaded images, scroll or trigger the page’s loading mechanism before calling
page.pdf(); otherwise the PDF can contain placeholders. - Wait for a meaningful application signal, such as
#report-ready, rather than assuming a generic network-idle event is correct.
Useful PDF options
format, orwidthandheight, sets the paper dimensions.landscape: truerotates the page.marginaccepts CSS lengths for each edge.printBackground: trueretains background colors and images that printing would otherwise omit.pageRangeslimits output to selected pages.scaleadjusts rendered size, while CSS remains the better place for structural layout.displayHeaderFooterand its templates add page metadata when required.
Save a page with a browser’s Print command
For a single document, open the page and choose Print (often Ctrl+P or Cmd+P), then select Save as PDF. Review destination, paper size, portrait or landscape orientation, margins, scale, background graphics and headers or footers. A page can provide a dedicated print stylesheet, so the preview—not the screen view—is the authoritative check.
Manual printing is the least operationally complex route, but it is not deterministic: different browsers, profiles and saved settings can produce different pagination. It also requires a person for every conversion.
Use Acrobat’s HTML conversion controls
Adobe documents conversion controls for layout, character encoding, colors, bookmarks, PDF tags, page size, orientation, margins, scaling and scrollable content (Adobe Acrobat web-page conversion help, updated September 23, 2025).
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 matchA practical Acrobat workflow
- Open Acrobat’s web-page conversion command and provide the page address or HTML source according to your edition.
- Set page dimensions, orientation, margins and scale-to-fit behavior before conversion.
- Choose whether to retain background colors and images, and select the required encoding.
- Enable bookmarks and PDF tags when preserving navigation or accessibility structure matters.
- Expand scrollable regions when content hidden inside a scrolling panel must appear in the PDF.
- Inspect the converted file for clipped columns, missing fonts, page breaks, link behavior and tagged structure before distribution.
Acrobat is convenient for human-directed work and exposes controls that are easy to review visually. The available documentation does not establish how its output compares in speed or fidelity with Puppeteer or other engines.
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)
Command-line conversion with wkhtmltopdf
The wkhtmltopdf project describes a headless command-line converter based on Qt WebKit that can produce PDF or images and is licensed under LGPLv3 (wkhtmltopdf project). A basic invocation is:
wkhtmltopdf --print-media-type --enable-local-file-access input.html output.pdf
Use --print-media-type when your stylesheet has a print-specific layout. --enable-local-file-access can expose local assets, so restrict inputs and filesystem permissions in multi-tenant systems. The reviewed project page is old-crawled; verify the current release, security posture and CSS support before adopting it for a new build. Modern layouts may rely on browser capabilities that a Qt WebKit engine does not provide.
Hosted HTML-to-PDF APIs
A hosted service can accept HTML or a URL and return a PDF, avoiding browser installation, sandboxing and scaling work in your application. Adobe PDF Services documents conversion from static HTML, dynamic HTML, ZIP files and URLs (Adobe PDF Services documentation). Its pricing page lists a vendor-published allowance of 500 free Document Transactions per month, with paid plans; verify the current terms before relying on that number (Adobe PDF Services pricing).
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Before sending documents to any hosted API, confirm whether HTML, assets and generated PDFs are retained, where processing occurs, how authentication works, and whether your compliance requirements permit external processing. Also check limits for file size, page count, concurrent jobs, URL access and dynamic JavaScript.
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
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. It is useful when the deliverable is a clean visual capture rather than a typeset, selectable-text PDF; its API returns PNG, JPEG or WebP, while its MCP server includes a capture_pdf tool for AI-agent workflows. A single request looks like this:
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 documentation for PDF capture and the other request options. Before capture, it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing status. AI agents can call its MCP tools take_screenshot, get_page_info and capture_pdf.
The Free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is included on every plan. Create a free ScreenshotNeo account to try it without a card.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesTroubleshooting HTML-to-PDF conversion
Blank or partially rendered pages
Check the URL, authentication and network access from the conversion host. In Puppeteer, log the response status, increase the navigation timeout within a bounded limit, and wait for an application-ready selector. A bot check or client-side error may be the real page content.
Missing backgrounds or colors
Enable printBackground: true in Puppeteer or the equivalent browser print option. If the screen stylesheet is required, emulate screen media before calling page.pdf(); otherwise print CSS is used.
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
Wrong page breaks or clipped wide content
Set an explicit paper size and margins, use @page, and remove fixed-width containers in print CSS. For Acrobat, adjust scale-to-fit and orientation. Recheck tables and scrollable panels in the PDF preview.
Fonts or icons are missing
Ensure font files and icon resources are reachable without an interactive login, wait for font readiness, and verify that the deployed environment has the same certificates and network policy as development.
Conversion never finishes
Long-polling, advertisements and WebSockets can defeat network-idle waits. Prefer a selector that signals completion, abort requests you do not need, and enforce a total timeout so failed jobs are retried or reported instead of consuming workers indefinitely.
Local files expose sensitive data
Do not enable local-file access for untrusted HTML unless it is isolated. Run conversion with least-privilege filesystem permissions, validate URLs, and separate tenants or jobs in containers or equivalent sandboxes.
Best Value
- Scanner type: Document
- Connectivity technology: USB
- With Auto Scan Mode, the scanner automatically detects what you're scanning
- Digitize documents and images
Production checklist
- Define whether output should follow print CSS or screen CSS.
- Specify paper size, margins, orientation, scale and background behavior.
- Wait for fonts, images and application data—not merely an arbitrary delay.
- Test representative long pages, tables, RTL text, links and page breaks.
- Decide whether bookmarks, PDF tags and selectable text are required.
- Bound navigation, rendering and queue times and record failures with the source URL.
- Pin your browser or converter version and review changes before deployment.
- For hosted services, verify current pricing, retention, limits, region and compliance terms.
Frequently Asked Questions
Can I convert an HTML string instead of a URL with Puppeteer?
Yes. Create a new page, call page.setContent(html, { waitUntil: 'networkidle0' }), wait for fonts and application assets, then call page.pdf(). Resolve or inline relative images, stylesheets and fonts because there may be no document URL from which to resolve them.
Does a PDF preserve HTML interactivity?
Usually not. JavaScript controls, hover states, form behavior and live data become a static document. Export the state users should see, and add PDF links or form fields separately when needed.
Free tools Windows power users keep installed
One-click scans. No signup required.
Which option is cheapest?
A browser’s built-in Print command has no separate conversion service cost. Automated and hosted costs depend on infrastructure and vendor terms; the available sources do not provide a comparable total-cost benchmark.
How should I handle confidential HTML?
Prefer an isolated, self-hosted browser when policy prohibits external processing. If using a hosted API, review its retention, processing location, access controls and contractual terms before transmitting data.
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.

