Quick summary of the tool
wkhtmltopdf is an open-source command-line utility that converts HTML pages into PDF documents or images. It uses the Qt WebKit rendering engine to reproduce the full HTML output and can save that output to a local file. If you prefer not to use the CLI, there is also a C library variant available. For users seeking a GUI-focused or different testing alternative, SoapUI (free) is often recommended.
Installing on Windows
Follow these steps to install wkhtmltopdf on a Windows machine:
- Run the downloaded installer executable.
- Accept the license agreement when prompted.
- On the component selection screen, enable wkhtmltopdf and the option to modify the system PATH, then continue.
- Choose an installation folder or accept the default by clicking Install.
- When installation finishes, click Close.
To confirm a successful installation, open Command Prompt or PowerShell and run: wkhtmltopdf --version If the program is installed correctly, this command will print the application name, license information, and author details.
Package contents and supported architectures
The distribution includes separate executables and builds for different outputs and CPU architectures:
- wkhtmltoimage.exe — the executable for producing image files from HTML.
- wkhtmltopdf.exe — the executable for generating PDF files from HTML.
Both 32-bit (x86) and 64-bit (x64) builds are provided with dedicated binaries for each architecture.
How to run it and common options
You can run wkhtmltopdf from a regular command prompt or from PowerShell. When invoked without arguments, it will display usage information and available switches. Common options let you tailor the output to your needs; for example:
- --orientation: set page orientation (portrait or landscape)
- --low-quality: produce a lower-quality PDF to save space
- --grayscale: render the output in grayscale
- --no-collate: disable collating of multiple input documents
- --collate: enable collating when combining several inputs
These and many other switches allow fine-grained control over headers/footers, margins, DPI, and more.
Who benefits from wkhtmltopdf
This tool is particularly useful for developers and administrators who are comfortable with command-line utilities and need automated, scriptable HTML-to-PDF/image conversion. It is fast and flexible, but for users unfamiliar with terminals or scripting, it can feel daunting. If you need a simpler GUI-based workflow, consider a graphical wrapper or an alternative tool.
Technical
- Windows
- Mac
- Free