Install wkhtmltoimage through Ubuntu’s wkhtmltopdf package. On Jammy (22.04) and Noble (24.04), run sudo apt update, install the package, then verify the executable with wkhtmltoimage --version. The package name is wkhtmltopdf; it supplies both the PDF and image command-line programs.
Install wkhtmltoimage with apt
The Ubuntu archive is the simplest installation route for supported Ubuntu releases. Open a terminal and run:
sudo apt update
sudo apt install wkhtmltopdf
wkhtmltoimage --version
When installation completes, the final command should print the installed version. Ubuntu’s Jammy package is listed as 0.12.6-2; Noble’s package is 0.12.6-2build2. Those are Ubuntu archive revisions, not separate wkhtmltoimage packages.
Confirm your Ubuntu release and architecture first
Package availability and binary compatibility depend on the Ubuntu release and CPU architecture. Check both before choosing an alternative package:
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →#1 Best Overall
lsb_release -a
dpkg --print-architecture
The commands above identify the release codename and architecture that apt is using. The package information covered here is verified for Ubuntu 22.04 Jammy and Ubuntu 24.04 Noble. Exact versions and dependencies can differ on interim releases or after archive updates, so inspect apt’s metadata on the machine you are configuring rather than copying a package version from another system.
Check that the command is really installed
Use these checks when a script says the executable cannot be found:
command -v wkhtmltoimage
wkhtmltoimage --version
command -v prints the path selected by your shell. If it prints nothing, the package is not installed in the current environment, the installation failed, or the executable is not on PATH. If it prints a path but execution fails, continue with the runtime checks below.
Render a local HTML file
After version verification, perform a real conversion with a small local document. Create example.html containing a heading and a paragraph, then run:
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteRank #2
wkhtmltoimage example.html example.png
The command follows the documented form wkhtmltoimage [OPTIONS]... <input file> <output file>. Use an output extension appropriate for the image format you need. This local check separates installation problems from problems caused by a remote page, DNS, authentication, JavaScript, or network policy.
What Ubuntu installs and why the package has a different name
Ubuntu describes wkhtmltopdf as command-line utilities that convert HTML to PDF or image with WebKit. The image executable is therefore delivered by the package whose name refers to the project family: wkhtmltopdf. Installing a package named wkhtmltoimage is not the Ubuntu archive method.
On Noble, the archive dependency set includes the C library, C++ standard library, Qt 5 core, GUI, network, print-support, SVG, WebKit and widget libraries. Dependency details are release-specific; let apt select the matching versions instead of manually copying a Noble library list to another Ubuntu release.
Headless servers: display and fonts matter
Ubuntu recommends an X server or xvfb (a virtual framebuffer) for this kind of rendering. A command that works in a desktop session can fail on a minimal server if no display environment is available. If your server is headless, install and configure the virtual framebuffer according to your Ubuntu release, then run the conversion inside that display context.
Recommended Free Tools
Rank #3
Fonts are another runtime dependency. The upstream project explains that even a “static” build still relies on system packages and runtime font configuration. Missing fonts can change line wrapping, glyphs and image dimensions without producing an obvious installation error. Install the fonts your page requires and keep the rendering host’s font configuration consistent between environments.
Ubuntu package or upstream .deb?
There are two legitimate installation paths. Use apt when the Ubuntu archive package meets your requirements. Consider an upstream distribution-specific Debian package only when a project explicitly requires that build or a particular release.
| Choice | When it fits | Important qualification |
|---|---|---|
| Ubuntu archive via apt | Most Jammy and Noble installations; apt resolves the archive’s dependencies. | Version and dependency metadata are tied to your configured Ubuntu repositories. |
| Upstream distribution-specific .deb | A project requires an upstream build or a specific package revision. | Match both Ubuntu release and architecture. The upstream download table lists Ubuntu builds through Jammy, not an official Noble build. |
The upstream project lists stable version 0.12.6, released June 11, 2020. Its download page hosts releases through GitHub, recommends distribution-specific packages and lists Ubuntu builds for 16.04 Xenial, 18.04 Bionic, 20.04 Focal and 22.04 Jammy, with architectures shown per release. Do not label a Jammy .deb as an official Noble build.
If you do download a .deb, select the file matching the target codename and architecture, then let apt resolve local dependencies where possible. A package that installs but fails at runtime may still be incompatible with the host’s shared libraries, OpenSSL, libc, display stack or fonts.
Rank #4
Diagnose runtime failures
The shell reports “command not found”
- Run
sudo apt updateandsudo apt install wkhtmltopdfagain. - Check
command -v wkhtmltoimageand confirm that your shell’sPATHincludes the reported directory. - Verify that you are running the command in the same environment where apt installed it, especially inside containers, virtual environments or remote sessions.
The binary exists but will not start
First run wkhtmltoimage --version. If it exits with a loader or shared-library error, inspect the binary and missing libraries:
command -v wkhtmltoimage
ldd "$(command -v wkhtmltoimage)" | grep 'not found'
Install dependencies through your Ubuntu repositories rather than copying random libraries from another release. If you selected an upstream package, re-check the codename and architecture and compare its runtime requirements with the host.
A headless job fails while desktop rendering works
Check the display environment and use an X server or xvfb as Ubuntu recommends. Also verify that required fonts are installed and available to the account running the job. A service account often has a different home directory and font configuration from an interactive desktop user.
The output is blank, incomplete or visually different
- Start with the local HTML test to remove network variables.
- Confirm that the input file is the one you intended and that the output path is writable.
- Compare fonts and display configuration between the working and failing hosts.
- If the source is remote, investigate page loading, authentication, DNS and outbound network restrictions separately from the installation.
Security: do not render untrusted HTML as-is
The upstream project gives this warning: “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 hostile. Sanitize it before rendering, isolate the renderer with appropriate operating-system permissions and network controls, and avoid exposing a service that accepts arbitrary markup without validation.
Best Value
Performance, reliability and maintenance considerations
Keep the rendering environment reproducible: pin the Ubuntu release, architecture, package source and font set used by production. The 0.12.6 stable series dates from 2020; that date identifies the release listed by the upstream project, but it does not establish current maintenance activity. Test the exact pages and fonts your application needs after upgrades.
For repeatable jobs, log the executable path, reported version, Ubuntu release, architecture and display configuration. These details make a rendering difference diagnosable without guessing which binary or dependency set was used. No benchmark timings or throughput figures are provided, so capacity planning should be measured on your own pages and hardware.
Or skip the browser setup
If you need an image or PDF from a URL rather than a local Ubuntu command, ScreenshotNeo provides a website screenshot API and MCP server. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets; each step can be disabled. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and the response reports the result with X-Page-Verdict and X-Billed headers.
One GET request returns PNG, JPEG, WebP or PDF output. The API also supports full-page captures with lazy images loaded, CSS-selector element captures, dark mode, device presets and custom viewports, retina scale, PDF paper and margin settings, custom CSS and JavaScript, pre-capture clicks, hidden selectors, selector/delay/network-idle waits, request and resource blocking, custom headers/cookies/user agents, Authorization, timezone and geolocation, transparent backgrounds, resizing, selectable-TTL caching, signed links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API and an OpenAPI specification. Parameter names used by other screenshot APIs also work for easier migration. AI agents can use the MCP tools take_screenshot, get_page_info and capture_pdf from Claude, Cursor or another MCP client.
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 errorsSee the ScreenshotNeo API documentation for authentication and options.
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}`);
The Free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan. Create a free ScreenshotNeo account.
Frequently Asked Questions
Does the 2020 date for version 0.12.6 prove that the project is unmaintained?
No. It establishes when the upstream page says 0.12.6 was released, but it does not by itself prove the project’s present maintenance status.
Will a static upstream binary remove all host dependencies?
No. The upstream documentation says static builds still rely on system packages and runtime font configuration, so compatibility testing on the target Ubuntu host remains necessary.
Free tools Windows power users keep installed
One-click scans. No signup required.
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.

