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

On Debian Bookworm for the amd64 architecture, install wkhtmltopdf with APT if your configured repositories offer it: run sudo apt update, then sudo apt install wkhtmltopdf. Availability is release- and repository-specific, so first confirm your Debian release and check APT’s package candidate. Debian’s Bookworm amd64 listing identifies version 0.12.6-2+b1; that does not establish availability on every Debian release.

Check your Debian release and architecture first

“64-bit Debian” does not identify a single package repository or CPU architecture. The Debian package listing cited here establishes availability for Bookworm on amd64. If your machine is running a different Debian suite, do not assume it has the same package or version. Likewise, a 64-bit ARM machine uses a different architecture from amd64.

  1. Check the operating-system release and version with cat /etc/os-release. Look for the Debian release information, including its codename.
  2. Check the package architecture with dpkg --print-architecture. For the Bookworm package listing discussed here, the expected architecture is amd64.
  3. Refresh the package indexes and inspect whether APT knows about the package:
    sudo apt update
    apt-cache policy wkhtmltopdf

In the policy output, look for a Candidate version. If it shows (none), APT does not currently have an installable candidate from the repositories configured on that machine. That can reflect the Debian suite, enabled repository components, or stale or incomplete package indexes; it is not a reason to install a package built for a different release without checking compatibility.

Install the Debian package with APT

If the release and architecture match your intended setup and apt-cache policy reports a candidate, APT is the simplest route. It installs the distribution package and resolves its declared dependencies.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Update package metadata: sudo apt update.
  2. Install the package: sudo apt install wkhtmltopdf.
  3. When APT presents the proposed changes, review them and confirm the installation if they are appropriate for the machine.
  4. Check that the command is available: wkhtmltopdf --version.

For Debian Bookworm amd64, the Debian package listing gives version 0.12.6-2+b1. Your installed version depends on the suite and repositories actually selected by APT; do not treat that Bookworm version as a promise for other releases.

Try a small conversion

After installation, test a simple conversion before integrating the tool into a script or production job. For example, if the machine can reach the public site, run:

wkhtmltopdf https://example.com example.pdf

Or create a small local HTML file and pass its path to wkhtmltopdf. Then check that the output file exists and opens as expected. These are suggested checks for your machine, not a guarantee that every page or rendering feature will work in every environment.

Understand the Debian build’s rendering limits

Debian describes wkhtmltopdf as a command-line program that creates PDF or image output from a URL, a local HTML file, or standard input, using WebKit for rendering. Debian’s package information says the program requires an X11 server and that the package is not built against the forked version of Qt. As a result, some command-line options are unsupported.

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

The Debian Bookworm package metadata also lists Qt 5 and Qt WebKit runtime dependencies. Those details describe that Bookworm package; they should not be generalized to every Debian package or third-party build.

Using it on a headless server

A server without a desktop session may still need an X11 environment for this build. Before making it part of a scheduled job or service, check whether an X server is available and whether a virtual framebuffer such as Xvfb is appropriate for your deployment. Do not assume that “command-line program” means “no display-related requirement.” Test the actual rendering path under the same account and environment that will run the job.

If your conversion fails only on a headless machine, inspect the error output for display or X-server problems before changing the input HTML. The Debian package’s documented X11 requirement is a relevant environmental constraint; it is not evidence that a different Qt build will automatically solve every headless rendering issue.

Choose between Debian’s package and an upstream build

Use the Debian package when it is available for your release and its supported behavior is sufficient. APT provides release-specific dependency handling, but Debian’s package is not built against the forked Qt variant, so functionality that depends on patched Qt may not be available.

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

The upstream 0.12.6 release directs users seeking binaries to a separate packaging project. That project discusses distro-native packages and patched Qt, which provides additional functionality. Its repository is archived, so treat its instructions and artifacts as legacy options—not as a universally better or currently maintained replacement for Debian’s package.

Route Availability and fit Important consideration
Debian APT package Use when the package is available in the target release’s configured repositories. The cited listing covers Bookworm amd64. APT handles package dependencies. Debian says its build is not based on forked Qt and that some options are unsupported.
Upstream packaging artifact The upstream 0.12.6 release points to a separate packaging project. The packaging repository is archived. Verify that a specific artifact matches the Debian release and architecture, and check whether the feature you need works in that build.

If you are considering an upstream artifact, verify its target distribution, release, and architecture before installing it. Do not mix packages built for different Debian releases or assume a binary described as “patched Qt” has a particular option unless the artifact’s documentation establishes it. If a required command-line option depends on patched Qt, confirm its behavior with the exact binary you plan to deploy.

Pay attention to local-file access

The upstream 0.12.6 release notes state that local filesystem access is blocked by default. This security change matters when a conversion expects to load local stylesheets, images, or other files: an input that relies on filesystem access may not behave as expected under the default restrictions.

Do not casually enable local-file access to make an untrusted conversion work. A renderer that can access local files may expose data available to the process if the input is malicious. Prefer controlled inputs and a deliberately limited execution environment. If local resources are essential, review the security implications and the exact binary’s documented behavior before changing access settings; do not assume that all builds expose identical options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting installation and conversion problems

  • APT says “Unable to locate package.” Run sudo apt update, then check cat /etc/os-release and apt-cache policy wkhtmltopdf. The package may not be present in the configured repositories for that suite.
  • The candidate is shown as (none). APT has no installable version in its current package indexes. Check the release and repository configuration rather than substituting a package built for another Debian version.
  • The package installs, but a requested option is rejected or has no effect. Debian notes that its package is not built against forked Qt and that some options are unsupported. Check whether the feature depends on patched Qt and verify the behavior of the exact build you installed.
  • Conversion fails on a headless server. Check for an available X11 server and review the Debian package’s X11 requirement. A virtual framebuffer such as Xvfb may be suitable in some deployments, but evaluate it in the target environment rather than assuming it is required or sufficient.
  • A page is missing local images, stylesheets, or other files. Check how the selected build handles local filesystem access. The upstream 0.12.6 release notes say access is blocked by default; do not weaken that protection for untrusted input without assessing the risk.
  • The output differs from the browser rendering. The tool renders with WebKit, and build-specific limitations can affect behavior. Confirm that the input page and any required resources are reachable from the conversion environment, then compare results using the precise build and options intended for deployment.

Or skip the browser setup

If your actual task is capturing a webpage rather than installing a local renderer, ScreenshotNeo offers a website screenshot API and MCP server. A single GET request can return a screenshot or PDF; this cURL example captures an image:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

See the ScreenshotNeo documentation for API options, including PDF capture. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are not billed. An 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.

Availability note

Debian’s package tracker records wkhtmltopdf as removed from testing on 2025-02-05, while the Debian package listing cited here includes a Bookworm amd64 package. That information is a reason to check the suite configured on your own machine; it does not establish the status of every Debian suite or snapshot.

For a machine where the package is available and its X11 and Qt-build limitations fit the job, the Debian APT package is a practical starting point. Confirm the candidate, test a representative conversion, and verify any required options with the exact build before relying on it in production.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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.