Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a one-time conversion, open the HTML file or webpage in a browser, press Ctrl+P (Windows/Linux) or Command+P (macOS), choose Save as PDF, check the preview, and save. For repeatable jobs, Chrome Headless, wkhtmltopdf, or a hosted API can render the page without a physical printer.

Choose the conversion method

Method Best for Important trade-off
ScreenshotNeo Automated remote pages and PDFs #1 choice for clean shots: consent banners, popups and chat widgets are removed before capture, only clean shots are billed, and the lowest paid plan is $5.
Browser print dialog A single local file or webpage Almost no setup, but each conversion is manual.
Chrome Headless Scripts, CI jobs and repeatable conversions Requires a Chrome/Chromium executable and careful timing for dynamic pages.
wkhtmltopdf Legacy pipelines and explicit rendering switches Uses the Qt WebKit engine, so modern pages can render differently from a current browser.

Save an HTML page as PDF in a browser

This is the fastest route when you need one document and can inspect it interactively.

  1. Open the local .html file in a browser, or navigate to the webpage.
  2. Open the print command: usually Ctrl+P on Windows/Linux or Command+P on macOS. Menu labels vary by browser and operating system.
  3. In the destination or printer list, select Save as PDF (or the platform’s equivalent PDF destination). A physical printer is not required.
  4. Inspect the preview before saving. Check page breaks, orientation, scale, margins, images and essential text.
  5. Choose a filename and location, then save the PDF.

Preview settings that affect the result

  • Orientation: use portrait for text-heavy pages and landscape for wide tables.
  • Scale: reduce it when content is clipped horizontally; increasing it can create more page breaks.
  • Margins: narrow margins provide more usable width but leave less room for binding or annotations.
  • Background graphics: enable this option when colors, cards or background images carry meaning; it can increase file size.
  • Headers and footers: disable browser-added date, title or URL text if the dialog offers those controls.

Local files and linked resources

An HTML file may reference separate stylesheets, images, fonts or scripts. The PDF can only include resources that the browser can read. Keep relative paths correct, use an absolute file:/// path when opening a local document, and make sure remote assets are reachable. A saved HTML file is not necessarily self-contained.

Automate conversion with Chrome Headless

Chrome’s official Headless command-line reference documents --print-to-pdf for writing a PDF without opening a visible window. See the Chrome Headless command-line reference for the current executable name and platform details.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
  • Scanner type: Document
  • Connectivity technology: USB
  • With Auto Scan Mode, the scanner automatically detects what you're scanning
  • Digitize documents and images

Convert a webpage

chrome --headless --print-to-pdf https://example.com/

This writes output.pdf in the current working directory by default. Set the output name explicitly:

chrome --headless --print-to-pdf=page.pdf https://example.com/

Convert a local HTML file

chrome --headless --print-to-pdf=page.pdf file:///absolute/path/to/page.html

Use an absolute path. On systems where the executable is named chromium or google-chrome, substitute that executable name.

Control timing and generated furniture

Option Purpose When to use it
--no-pdf-header-footer Suppresses Chrome’s generated print header and footer, including date/time, URL and page number. Use when the document must contain only page content. Older Chrome versions may require the older flag name --print-to-pdf-no-header.
--timeout=<milliseconds> Sets a maximum wait before capture even if the page is still loading. Useful when a page can otherwise wait indefinitely.
--virtual-time-budget=<milliseconds> Allows time-dependent JavaScript to advance under virtual time before capture. Useful for content that appears after initial parsing, but it does not guarantee that every site-specific asynchronous task has completed.

A practical dynamic-page command

chrome --headless --no-pdf-header-footer --timeout=15000 --virtual-time-budget=5000 --print-to-pdf=report.pdf https://example.com/

Choose timing values for the page rather than treating them as universal defaults. After the command exits, verify that the output file exists, has a nonzero size and contains the expected final state. JavaScript runs before Chrome serializes the page, but login prompts, user interaction and site-specific network work can still prevent complete output.

Rank #2
Sale
Brother DS-640 Compact Mobile Document Scanner, (Model: DS640)
  • 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)

Use wkhtmltopdf as an alternative renderer

wkhtmltopdf is an open-source, LGPLv3 headless command-line program that renders HTML to PDF with the Qt WebKit engine. Its basic pattern is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
wkhtmltopdf http://google.com google.pdf

It is a different renderer from Chrome. If your page relies on modern browser features or complex scripting, compare the PDF with a current-browser printout instead of assuming identical results.

Useful wkhtmltopdf controls

The wkhtmltopdf usage documentation describes switches for:

Rank #3
Plustek PS186 Desktop Document Scanner, with 50-Pages Auto Document Feeder (ADF). for Windows 7/8 / 10/11 (Intel/AMD only)
  • Up to 255 customize favorite scan file setting with "Single Touch" , Support Windows 7/8/10
  • Turn paper documents into searchable, editable files - save scans as searchable PDF files; OCR function included
  • Info Barcode function - automatic categorization of complicate documentation and data with 1D or 2D Barcode page.
  • Intelligent color and image adjustments — Auto Rotate, Crop, Deskew and blank page remove with Plustek Image Processing Technology
  • Easy send scanned files to FTP server or personal NAS (FTP) with PDFs , Jpeg , TIFF or Png format. User can download scanner driver from Plustek website
  • JavaScript execution and a configurable --javascript-delay.
  • Image loading and print-media CSS through --print-media-type.
  • Paper size, page orientation, margins, headers and footers.
  • Load-error handling and whether failures should stop the job.
  • Local-file access, which should be enabled or restricted deliberately for your input.

The documented manual enables JavaScript by default, but flags and behavior depend on the installed version. Check that version’s manual before placing a command in production.

Batch conversion and repeatability

For one document, browser printing is easiest. For a folder, scheduled report or CI pipeline, use a command-line renderer and make each run observable:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Use a fixed, writable output directory and deterministic filenames.
  • Record the command’s exit status and check that every expected PDF was created.
  • Keep representative HTML fixtures that include images, web fonts, long tables and delayed content.
  • Review at least the first, middle and last pages of a sample output after changing browser, renderer or CSS versions.
  • Make network access explicit. A page that depends on a login, blocked request or unavailable CDN cannot be made complete by changing the output filename.

wkhtmltopdf’s manual also discusses reading multiple invocations from standard input for batch work. Chrome can be called repeatedly by your own shell script, build job or application.

Rank #4
Hczrc Portable Scanner, Photo Scanner for A4 Documents, Handheld Scanner for Business, Photo, Picture, Receipts, Books, JPG/PDF Format Selection, UP to 900 DPI, with 16G SD Car
  • Note: No software installation is required. You need 2 AA batteries ( not included) and a memory card ( included) to use it directly. Scan mode: Press and hold "Scan" for 2 seconds to turn on the device, and then press "Scan", the green light is on. The scanner moves to scan the file until the green light turns off automatically (or press the "Scan" key and the green light goes out). The number shown on the display increases by 1 to indicate that the scan is complete.
  • Portable Scanner scans images or pictures quickly: Store JPEG/PDF files within seconds, scan images or pictures quickly, plug and play, no need any software preinstalled. Compatible with Windows XP/7/Vista/Mac OS 10.4 or above version.
  • Lightweight and travel-friendly: Stored in Micro SD card directly, support read data on your computer or phone with USB connected. Powered by 2pcs AA batteries, Compact Design, it is convenient to carry outside.
  • 3 Image Resolution: 3 modes of resolution for your options: 300dpi/600dpi/900dpi, you can save it at the clearest way, picture and document are showed clear as it is. Freely choose your favorite resolution.File Format: JPEG/PDF format is all available, Great storage capacity as it supports 32G Micro SD card(Included 16GB Card),total meet your need for business trip or daily use.
  • Widely Used: It is applicable in bank, insurance business, real estate agency,home, office, library or outdoors. suitable for lawyer, businessmen, students, travelers and amateur archivists. Scan your important files and save them immediately, no struggling in finding a printing shop, keep it confidential.

Troubleshoot blank, incomplete or poorly paginated PDFs

The PDF is blank or only partly rendered

  • Open the same URL or file interactively and confirm it loads without a login, consent action or other user interaction.
  • Check that all linked CSS, images, fonts and scripts are available from the conversion environment.
  • For Chrome, increase --timeout or provide a virtual-time budget, then inspect the resulting PDF rather than assuming a longer wait solved the page.
  • For wkhtmltopdf, review JavaScript delay, load-error and local-file-access settings in the installed manual.

Images, fonts or styles are missing

Determine whether each asset is embedded, a relative local file or a remote resource. Correct relative paths and confirm network access for remote URLs. Local-file permissions matter especially when a document loads assets from neighboring directories; configure them intentionally rather than broadly exposing unrelated files.

Page breaks split tables or headings

Use the print preview to adjust scale, margins and orientation. Add print-specific CSS where you control the HTML, and test long tables and repeated headings. Screen layout does not automatically become attractive pagination.

Chrome adds an unwanted URL, date or page number

Use --no-pdf-header-footer in Headless mode. With an older Chrome release, try the documented older spelling --print-to-pdf-no-header.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Epson Workforce ES-50 Compact & Lightweight Mobile Document Scanner
  • 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

Output differs between Chrome and wkhtmltopdf

That is expected when the page uses browser features, JavaScript timing or CSS interpreted differently by Qt WebKit and a current Chromium engine. Pick one renderer for a pipeline, pin its version where possible, and validate representative pages after upgrades.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server that can return a PNG, JPEG, WebP or PDF from one GET request. Before capture it accepts the cookie or consent banner like a visitor and removes more than 60 known consent platforms, newsletter popups and chat widgets; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and each response identifies the page verdict and billing status in X-Page-Verdict and X-Billed headers.

Use the ScreenshotNeo API documentation for authentication and parameters. The following examples use the supplied API shape and save the response body locally.

cURL

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Change only the target URL for your page and request PDF output when selecting the API’s PDF parameters. The service also supports full-page capture with lazy images loaded, a single element by CSS selector, dark mode, 12 device presets or any viewport, retina scale, PDF paper size, margins, landscape mode and page ranges, HTML/CSS-to-image, custom CSS and JavaScript, clicking before capture, hiding selectors, waiting for a selector, delay or network idle, and transparent backgrounds or image resizing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Controls for production captures

  • Block ads, trackers, requests or resource types when those resources interfere with a clean document.
  • Provide custom headers, cookies, user agent or Authorization values for authenticated pages.
  • Set timezone and geolocation to reproduce regional output.
  • Choose a cache TTL, create signed links for public <img> tags, or submit asynchronous jobs with signed webhooks.
  • Send up to 100 URLs per bulk call, inspect usage through the usage API, and integrate from the published OpenAPI specification.
  • Parameter names used by other screenshot APIs also work, which can simplify migration.

Pricing and fit

Plan Included shots Price
Free 1,000 per month $0; no card required
Starter 3,000 $5
Growth 15,000 $15
Pro 60,000 $39
Scale 250,000 $99
Business 1,000,000 $249

Yearly billing gives two months free, and every feature is available on every plan. If you need a hosted conversion without maintaining Chrome, create a free ScreenshotNeo account with 1,000 screenshots per month and no card.

Final validation checklist

  • Confirm the intended URL or absolute local path was used.
  • Check that images, fonts, styles and scripts were reachable.
  • Inspect page size, orientation, margins, scale and page breaks.
  • Verify dynamic content finished loading before capture.
  • Remove generated headers and footers when they are not wanted.
  • Open the saved PDF in a second viewer and check representative pages.

Frequently Asked Questions

Is a PDF conversion reproducible on every computer?

Not necessarily. Browser or renderer versions, available fonts, CSS support and network responses can change pagination and appearance. For repeatable jobs, keep the renderer version and conversion environment consistent and validate sample pages after upgrades.

Can I convert an HTML file while completely offline?

Only if every required stylesheet, image, font and script is local or embedded. Any remote dependency that cannot be reached will be missing or may leave the page incomplete.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.