October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Redmond desk3 min

How to Capture a Webpage as a PDF with wkhtmltopdf on Windows

Use wkhtmltopdf from Command Prompt or PowerShell to turn a webpage URL into a PDF, with Windows setup, layout options, and security guidance.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install the Windows build of wkhtmltopdf, then run wkhtmltopdf https://example.com C:UsersyouDownloadspage.pdf in Command Prompt or PowerShell. Replace the example URL and destination with your own. If a path contains spaces, enclose it in quotation marks.

Install wkhtmltopdf for Windows

Get the Windows installer or archive from the official wkhtmltopdf downloads page. The page lists installers for Vista or later in 32-bit and 64-bit versions, plus 7z archives for XP/2003 or later in both architectures. Choose an asset that matches your Windows environment, and confirm it is still offered there before downloading: the page identifies 0.12.6, released June 11, 2020, as its stable series, but that release date is not evidence of a newer current release.

As an Amazon Associate I earn from qualifying purchases.

wkhtmltopdf is an open-source command-line utility that renders HTML to PDF using the Qt WebKit rendering engine. The project says it runs headlessly, without a display service, and identifies its license as LGPLv3. See the project overview.

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

Convert a webpage to PDF

  1. Open Command Prompt or PowerShell.
  2. Run the command below, substituting the webpage URL and the full path where you want the PDF saved:
    wkhtmltopdf https://example.com C:UsersyouDownloadspage.pdf
  3. When the command finishes, open the PDF and check that the content and page layout are usable.

The command follows the project’s documented URL-to-PDF form. If the output path includes spaces, quote it, for example: wkhtmltopdf https://example.com "C:UsersyouMy Reportspage.pdf". The project documentation shows the basic conversion form; quoting paths is standard Windows shell practice.

#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

Check that Windows can run the command

To check the installed executable, run wkhtmltopdf --version. If Windows reports that it cannot find the command, try running wkhtmltopdf.exe by its full installed path. You can also add the executable’s directory to PATH; installer behavior may differ, so do not assume PATH was configured automatically.

Adjust page layout and output

Once the basic conversion works, wkhtmltopdf’s usage manual documents controls for paper size, orientation, margins, grayscale output, image quality, and headers and footers. For example, this command requests Letter paper in landscape orientation:

Rank #2
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

wkhtmltopdf --page-size Letter --orientation Landscape https://example.com C:Reportspage.pdf

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

This illustrates the documented option syntax; it has not been verified across Windows releases. The manual also documents header and footer placeholders including [page], [topage], [webpage], and [title]. Consult the usage manual for exact option names and further controls.

Rank #3
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)

Security warning for untrusted content

The project warns: “Do not use wkhtmltopdf with any untrusted HTML – be sure to sanitize any user-supplied HTML/JS, otherwise it can lead to complete takeover of the server it is running on!” Treat user-submitted HTML and JavaScript as unsafe before converting it, particularly in server-side or batch workflows. See the warning on the official downloads page.

Troubleshoot common problems

  • “wkhtmltopdf” is not recognized: Windows cannot locate the executable. Run it using its full path or configure the installed directory in PATH.
  • The PDF is not saved where expected: Check the destination path and permissions. Quote a destination containing spaces.
  • The output layout is unsuitable: Try a different paper size, orientation, or margin setting; confirm the resulting PDF rather than assuming the command’s options produce the same layout on every system.
  • Modern page content is missing or incorrect: The project describes a Qt WebKit-based renderer, but the available compatibility evidence does not establish reliable rendering for modern JavaScript-heavy sites or current Windows versions. Verify the actual output for the page you need.

Or skip the browser setup

ScreenshotNeo can return a webpage as a PDF with one API request. Its capture process accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and responses identify the page verdict and billing status. ScreenshotNeo also offers an MCP server with screenshot and PDF 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.

See the ScreenshotNeo API documentation for request options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
Epson Workforce ES-400 II High-Speed Color Duplex Desktop Document Scanner
  • FAST DOCUMENT SCANNING — Document scanner with feeder allows you to speed through stacks with a 50-sheet Auto Document Feeder (ADF); Efficient office scanner to help you scan more productively
  • INTUITIVE, HIGH-SPEED SOFTWARE — Quickly scan with this desktop document scanner; Epson ScanSmart Software lets you easily preview scans, email files, upload to the cloud, and more; Plus, automatic file naming saves even more time
  • SEAMLESS INTEGRATION — Easily incorporate your data into most document management software with the included TWAIN driver; Office document scanner integrates seamlessly with business workflows
  • EASY SHARING — Duplex scanner allows you to scan straight to email or popular cloud storage2 services like Dropbox, Evernote, Google Drive, and OneDrive for simple storage and sharing
  • SIMPLE FILE MANAGEMENT — Scanner allows the creation of searchable PDFs with Optical Character Recognition (OCR) and convert scans to editable Word or Excel files effortlessly; Designed for home and office document scanning
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o page.pdf

ScreenshotNeo is a website screenshot API and MCP server from Yorker Media. Create a free account at ScreenshotNeo sign-up.

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

Frequently Asked Questions

Does wkhtmltopdf require a display service on Windows?

The project describes wkhtmltopdf as a headless tool that does not require a display service.

Best Value
Sale
ScanSnap iX1300 Wireless or USB Double-Sided Color Document Scanner, Black
  • FITS SMALL SPACES AND STAYS OUT OF THE WAY. Innovative space-saving design to free up desk space, even when it's being used
  • SCAN DOCUMENTS, PHOTOS, CARDS, AND MORE. Handles most document types, including thick items and plastic cards. Exclusive QUICK MENU lets you quickly scan-drag-drop to your favorite computer apps
  • GREAT IMAGES EVERY TIME, NO EXPERIENCE REQUIRED. A single touch starts fast, up to 30ppm duplex scanning with automatic de-skew, color optimization, and blank page removal for outstanding results without driver setup
  • SCAN WHERE YOU WANT, WHEN YOU WANT. Connect with USB or Wi-Fi. Send to Mac, PC, mobile devices, and cloud services. Scan to Chromebook using the mobile app. Can be used without a computer
  • PHOTO AND DOCUMENT ORGANIZATION MADE EFFORTLESS. ScanSnap Home all-in-one software brings together all your favorite functions. Easily manage, edit, and use scanned data from documents, receipts, business cards, photos, and more

What does the wkhtmltopdf project identify as its license?

The project overview identifies the software as LGPLv3.

Quick Recap

Bestseller No. 1
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
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
$75.00

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.