October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

Install wkhtmltopdf on Ubuntu 24.04 and Verify It Works

Install the Noble archive build of wkhtmltopdf, identify the executable your shell will run, and verify it by converting a local HTML file to PDF.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

On Ubuntu 24.04 (Noble), the simplest installation is Ubuntu’s APT package: run sudo apt update, then sudo apt install wkhtmltopdf. Check the executable path and version, then convert a small local HTML file to confirm rendering works in your environment. Ubuntu lists the Noble amd64 package as 0.12.6-2build2 in Universe; a separate third-party guide reports a different upstream Jammy build that may be installed on Noble, but that is not an Ubuntu-endorsed compatibility guarantee.

Install the Ubuntu 24.04 archive package

For the version packaged for Noble, use APT:

sudo apt update
sudo apt install wkhtmltopdf

Ubuntu lists wkhtmltopdf in the Universe repository for amd64 as version 0.12.6-2build2. It is a command-line utility that converts HTML to PDF or image using WebKit. The package listing identifies Qt 5 and Qt WebKit dependencies and recommends an X server or Xvfb; runtime needs can therefore matter on a headless server. See the Ubuntu Noble package listing.

As an Amazon Associate I earn from qualifying purchases.

If APT reports that it cannot locate the package, confirm that the Universe component is enabled in your repository configuration, then refresh metadata and retry.

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

Choose a build that matches your requirements

Ubuntu’s package is the straightforward choice when you want the Noble archive build and its package-manager integration. If your application specifically depends on behavior associated with upstream’s patched-Qt build, check the installed build and test the required behavior rather than assuming all wkhtmltopdf packages are equivalent. The upstream packaging project distinguishes patched-Qt builds and says distribution support for them is preferable when available.

A third-party guide reports that its upstream 0.12.6.1-3 Jammy amd64 .deb works on Noble after installing listed font and runtime dependencies. This is a reported recipe, not an official Ubuntu package listing or an independently validated guarantee. It is a different build from Noble’s 0.12.6-2build2; do not treat the version strings as interchangeable. See the third-party installation guide.

Route Build identity What to consider
Ubuntu APT archive Noble amd64 package 0.12.6-2build2 Ubuntu package integration; package listing includes Qt/WebKit dependencies and recommends an X server or Xvfb.
Reported upstream Jammy package 0.12.6.1-3 Jammy amd64 .deb A third-party guide reports installation on Noble with font/runtime dependencies; compatibility is not established as an Ubuntu guarantee. Verify the actual build and the behavior your application needs.

Check which wkhtmltopdf is running

After installation, check both command resolution and version:

command -v wkhtmltopdf
wkhtmltopdf --version

The path shows which executable your shell will run; the version output helps identify its build. For the reported upstream-package route, the third-party guide uses which wkhtmltopdf and wkhtmltopdf -V, and reports a path of /usr/local/bin/wkhtmltopdf with a version line marked with patched qt. The archive package may resolve to /usr/bin/wkhtmltopdf. Neither path by itself proves a conversion will succeed.

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

Smoke-test a local conversion

Use a small local file to test actual rendering and output creation:

printf '<h1>wkhtmltopdf check</h1><p>Local render succeeded.</p>n' > /tmp/wkhtmltopdf-check.html
wkhtmltopdf /tmp/wkhtmltopdf-check.html /tmp/wkhtmltopdf-check.pdf
file /tmp/wkhtmltopdf-check.pdf

A successful check should leave a PDF at the requested path, and file should identify it as a PDF document. This is a suggested verification procedure, not a claim that a test was run for this article.

Troubleshoot installation and conversion

  • APT cannot locate the package: Ubuntu lists it in Universe. Check whether Universe is enabled, then run sudo apt update before installing again.
  • The downloaded .deb has unmet dependencies: The third-party guide reports missing font packages as a common issue for its route, including xfonts-75dpi and xfonts-base, along with runtime libraries. Follow the dependency list for that package and use APT to install dependencies or repair package configuration; do not assume those instructions apply identically to the archive package.
  • The path is unexpected: Run command -v wkhtmltopdf and inspect for multiple installations. A downloaded upstream package may place the executable under /usr/local/bin, while the distribution package may use /usr/bin; your shell may therefore invoke a different copy than intended.
  • Conversion fails on a headless host: Review the selected package’s runtime dependencies and the Ubuntu package listing’s X server or Xvfb recommendation. A package installing successfully does not by itself establish that rendering has all runtime support it needs.
  • The executable runs but required output differs: Confirm the version line and test the feature your application relies on. Patched-Qt and other builds should not be presumed to have identical behavior.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your task is to capture a website as an image or PDF rather than install a local HTML-to-PDF executable, ScreenshotNeo provides a website screenshot API and MCP server. A single request can return a screenshot or PDF:

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 request options. It removes cookie/consent banners, newsletter popups and chat widgets before capture; bot checks, blank pages and failed loads are not billed. Its MCP server lets AI agents take screenshots, and the Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for free: 1,000 screenshots a month, no card required.

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

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.

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
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

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.