How to install wkhtmltopdf

Hi,

Trying to use wkhtmltopdf in Local.

Obviously if I SSH in the command doesn’t exist.

Assume I have to install, but don’t know which version from https://wkhtmltopdf.org/downloads.html

Thanks,
Tom

Since the downloads page doesn’t have a stand alone binary, you’ll likely need to download the package, and any dependencies.

It looks like wkhtmltopdf has a package that can be installed using apt so that should make it easier for you.

The commands I used to start that installation:

  1. SSH into the container
  2. Search for the wkhtmltopdf package using: apt-cache search wkhtmltopdf
  3. Seeing it listed, I then try installing it: apt install wkhtmltopdf
  4. I didn’t finish installing, but it should work for your needs

Not quite sure how it should all be setup, but that should get you pointed in the right direction!

– Ben

Hi, I’ve already done this, just get an error message.

59

Thanks

You may need to run apt-get update first to update the index for apt. Once you do that, try the apt install command again.

Thanks both.

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.