Recommended Free Tools
On Ubuntu 22.04 (Jammy), the simplest way to install wkhtmltopdf is through Ubuntu’s package manager. The package is in the universe archive component and is listed as version 0.12.6-2. If universe is enabled, run sudo apt update and then sudo apt install wkhtmltopdf. Verify the command with wkhtmltopdf --version. The instructions below explain how to check the package source, when to consider an upstream build, and how to handle common installation problems.
Install the Ubuntu package
For a typical Jammy system, start with Ubuntu’s archive package rather than downloading a standalone .deb. Ubuntu lists wkhtmltopdf version 0.12.6-2 in the Jammy universe component. Its package record describes command-line tools that convert HTML to PDF or image using WebKit; the package has Qt 5 and Qt WebKit runtime dependencies. Installing with apt lets the package manager resolve the archive package’s dependencies. See the Ubuntu Jammy package record and Ubuntu’s package download guidance.
-
Refresh the package index:
sudo apt update -
Install the package:
sudo apt install wkhtmltopdf -
Check where the executable is available and print its version:
command -v wkhtmltopdf
wkhtmltopdf --version
The first check should print a path to the command; the second should identify the installed build. The version string is useful when diagnosing differences between Ubuntu’s package and a package obtained from upstream. Do not assume that two packages with similar version numbers are identical builds.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
If apt cannot find the package
Ubuntu places the package in universe. If apt install reports that it cannot locate wkhtmltopdf, first check whether universe is enabled in your system’s software sources. If it is not, enable that component using Ubuntu’s Software & Updates settings, then refresh the package index with sudo apt update and try the installation again. A stale index can also cause apt not to see recently changed package information, so refreshing it is a sensible first check.
Choose between Ubuntu’s package and an upstream build
Use the Ubuntu archive package unless your application specifically requires an upstream build. The archive route is the straightforward choice for a Jammy machine: apt installs Ubuntu’s package and manages its dependencies. The wkhtmltopdf project also lists Ubuntu 22.04 builds, including amd64, on its downloads page. Upstream says its downloads are hosted through GitHub releases and identifies 0.12.6 as the stable series, released June 11, 2020. The project repository records Jammy 0.12.6.1-2 assets; check the official release listing for the current asset name rather than relying on a filename copied from old instructions. The project reference is the wkhtmltopdf repository commit page.
| Route | Package and dependencies | When it fits | What to verify |
|---|---|---|---|
| Ubuntu archive through apt | Jammy lists 0.12.6-2 in universe; apt manages the package dependencies. |
Most Ubuntu 22.04 installations that need the distribution package. | Confirm universe is enabled and inspect wkhtmltopdf --version after installation. |
| Upstream Jammy release asset | The project lists Jammy builds; dependencies and asset details depend on the chosen package. | A workflow that specifically requires an upstream build rather than Ubuntu’s archive package. | Match the asset to the machine’s architecture, check its dependency requirements, and verify the installed version. |
The Ubuntu download guidance recommends using a package manager instead of manually downloading a package. If you do need the upstream route, do not select an asset solely because its filename contains “Ubuntu” or “Jammy”: check that it matches the machine architecture and follow the dependencies stated for that asset. The available sources do not establish which exact release asset is newest at publication time, nor do they establish that the Ubuntu and upstream builds render identically or perform at the same speed.
Confirm the install and make a first conversion
After installation, check both the executable’s location and the version before integrating it into a script or application:
Outdated 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 matchPC 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 & 11command -v wkhtmltopdf
wkhtmltopdf --version
To convert a local HTML file to a PDF, provide the input file followed by the output filename:
wkhtmltopdf input.html output.pdf
This is a minimal invocation: it asks the installed command to turn the named HTML input into a PDF. The package description also identifies HTML-to-image conversion among the command-line tools’ capabilities, but this installation guide does not assume that every option or rendering behavior is the same across Ubuntu and upstream builds. If a particular output option is important, check the help and version information for the build installed on your system.
Security: keep untrusted HTML out of the conversion process
This is especially important when running wkhtmltopdf on a server. 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 on which it is run!” Treat user-controlled HTML and JavaScript as unsafe input. Do not pass it directly to the converter; sanitize it or exclude it from the conversion workflow. This warning comes from the wkhtmltopdf downloads page.
Troubleshoot common installation problems
E: Unable to locate package wkhtmltopdf
-
Check that the system is using Ubuntu 22.04 package sources and that the
universecomponent is enabled.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 →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Run
sudo apt updateafter changing software sources, then retrysudo apt install wkhtmltopdf. -
If the package still is not listed, review the configured repository sources and whether they are reachable. The Jammy archive record confirms the package exists in
universe; it does not guarantee that every machine has that component enabled or can reach its configured mirrors.
The command is missing after apt reports a successful install
Run command -v wkhtmltopdf in the same environment where the application will run. If the command is missing there, verify the installation with dpkg -l wkhtmltopdf and check whether the application runs with a different environment or user account. A command available in an interactive shell may not automatically be available to a service with a different PATH.
The installed version differs from instructions you found
Use wkhtmltopdf --version as the local source of truth. Instructions may refer to Ubuntu’s 0.12.6-2 package or an upstream Jammy release asset, which are not the same package source. If a workflow requires a particular build, compare its requirement with the version output and install the matching architecture-specific asset only after checking its official release details.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsRank #4
A downloaded upstream package reports dependency problems
First confirm that the file matches both Ubuntu 22.04 and the CPU architecture of the machine. Then review the dependency requirements for that specific release asset. Ubuntu’s package-manager guidance favors apt-based package installation; a manually downloaded package may not receive the same dependency resolution unless installed through a package manager configured to resolve them. If you do not specifically need the upstream build, remove the uncertainty by using the Jammy archive package instead.
Conversion fails even though installation succeeded
Separate installation from conversion diagnosis: verify the executable and version first, then test with a small HTML input that you control. If the input is user-supplied, stop and address the security issue rather than passing it through unchanged. The available package information confirms the conversion purpose and runtime dependencies, but it does not establish a universal fix for page-specific rendering failures. Record the input type, installed version, and exact error before changing package sources or substituting builds.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Performance, reliability, and operating cost
The Jammy package record identifies Qt 5 and Qt WebKit runtime dependencies, but the cited package information does not provide a benchmark or a performance guarantee. Rendering time and output behavior can depend on the input and the build; do not infer a speed advantage from package source alone. For a server or batch workflow, test representative inputs in the same environment in which the command will run, and monitor failed conversions rather than assuming a successful package installation guarantees every document will convert.
The software is installed from Ubuntu’s archive or an upstream release asset; the sources cited here do not state a price for either package. For deployment planning, account for the machine and operational costs separately from the package itself. Keep the source and version used by your workflow explicit so an update or a switch between Ubuntu and upstream packages is detectable.
Best Value
Or skip the browser setup
wkhtmltopdf is the local command-line route for HTML-to-PDF or image conversion. If your actual task is capturing a website as an image or PDF through an API, ScreenshotNeo is a separate option; it does not replace a local wkhtmltopdf installation for workflows that depend on that command or its build.
One GET request can capture a URL. This cURL example saves a screenshot:
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 API documentation for the request options. ScreenshotNeo accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. It also offers an MCP server for AI agents, with take_screenshot, get_page_info, and capture_pdf tools. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Every feature is on every plan.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Frequently Asked Questions
Does installing the Jammy package require a separate Qt WebKit download?
Ubuntu lists Qt 5 and Qt WebKit among the package’s runtime dependencies. Install through apt so the package manager handles the archive package’s dependencies; do not fetch runtime libraries from unrelated download sites.
Can I treat the Ubuntu and upstream version strings as proof that the builds are identical?
No. The package source and build can differ. Check the installed command’s version and use the exact build your workflow requires; the cited sources do not establish identical rendering or performance.
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.




