- Stable
- Archive
- Why do you have static builds with patched Qt?
- Why are there no “generic” Linux builds (which were provided earlier)?
- I don’t see an appropriate download for my platform!
- How do I use it with FaaS setups?
- How do I use it in AWS Lambda?
- Symantec reports a virus WS.Reputation.1 for the Windows builds
- isogram / wkhtmltopdf_wkhtmltoimage.md
- This comment has been minimized.
- ckarrie commented Nov 8, 2016
- This comment has been minimized.
- bwasmith commented Jun 5, 2017
- This comment has been minimized.
- fliespl commented Jul 27, 2017
- This comment has been minimized.
- parhs commented Aug 17, 2017
- This comment has been minimized.
- zloynemec commented Sep 12, 2017
- This comment has been minimized.
- smash-wp commented Oct 27, 2017
- This comment has been minimized.
- kjellberg commented Apr 11, 2018
- This comment has been minimized.
- danielmcfarland commented Apr 25, 2018
- This comment has been minimized.
- jiwom commented Jul 18, 2018 •
- Установка wkhtmltopdf & wkhtmltoimage в Ubuntu 20.04 | 18.04 / Debian 10 | 9
- Установка wkhtmltopdf & wkhtmltoimage в Ubuntu 20.04 | 18.04 / Debian 10 | 9
- Установка wkhtmltopdf в Ubuntu 20.04 | 18.04 и Debian 10 | 9
- Установка wkhtmltopdf в Ubuntu 20.04 / 18.04
- Установка wkhtmltopdf в Debian 10 / Debian 9
- Использование wkhtmltopdf в Ubuntu / Debian
- How To Install wkhtmltopdf and wkhtmltoimage On Ubuntu 20.04
- Step 1: Update Your System
- Step 2:Install wkhtmltopdf on Ubuntu 20.04
- Step 3: How to Use wkhtmltopdf on Ubuntu 20.04
- Installing wkhtmltopdf on Ubuntu 14.04 and 16.04
- Installing wkhtmltopdf Dependencies
- Downloading & Extracting Archive
- Moving Binary File & Permissions
- Testing wkhtmltopdf
All downloads are currently hosted via GitHub releases, so you can browse for a specific download or use the links below.
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! Please read the project status for the gory details.
Stable
The current stable series is 0.12.6, which was released on June 11, 2020 – see changes since 0.12.5.
OS/Distribution | Supported on | Architectures | ||||
---|---|---|---|---|---|---|
Windows | Installer (Vista or later) | 64-bit | 32-bit | |||
7z Archive (XP/2003 or later) | 64-bit | 32-bit | ||||
macOS | Installer (10.7 or later) | 64-bit | ||||
Debian | 10 ( buster ) | amd64 | i386 | arm64 | ppc64le | raspberrypi |
9 ( stretch ) | amd64 | i386 | arm64 | raspberrypi | ||
Ubuntu | 20.04 ( focal ) | amd64 | arm64 | ppc64le | ||
18.04 ( bionic ) | amd64 | i386 | arm64 | ppc64le | ||
16.04 ( xenial ) | amd64 | i386 | arm64 | |||
CentOS | 8 | x86_64 | aarch64 | ppc64le | ||
7 | x86_64 | i686 | aarch64 | ppc64le | ||
6 | x86_64 | i686 | ||||
Amazon Linux | 2 | x86_64 | aarch64 | lambda zip | ||
openSUSE Leap | 15 | x86_64 | aarch64 | ppc64le | ||
Arch Linux | 20200705 | x86_64 |
All of the above packages were produced automatically via Azure Pipelines and were built on the latest OS/distribution patch release at the time of the release.
Archive
Please note that bug reports will not be accepted against the following, which are considered obsolete. It is recommended to use the latest stable release instead, and report an issue if there is a regression from a previous release.
Date | Release |
---|---|
2018-06-11 | 0.12.5 |
2019-04-30 | 0.12.1.4 (linux-only) |
2016-11-22 | 0.12.4 |
2016-03-02 | 0.12.3.2 (windows-only) |
2016-01-30 | 0.12.3.1 (windows-only) |
2016-01-20 | 0.12.3 |
2015-07-12 | 0.12.2.4 (windows-only) |
2015-06-20 | 0.12.2.3 (windows-only) |
2015-04-06 | 0.12.2.2 (windows-only) |
2015-01-19 | 0.12.2.1 |
2015-01-09 | 0.12.2 |
2014-06-26 | 0.12.1 |
2014-02-06 | 0.12.0 |
If you need versions older than 0.12.0 , you can look at the obsolete downloads.
Why do you have static builds with patched Qt?
Good question. Some features require you to use a patched Qt, because those aren’t yet upstream – please read the project status for a longer explanation.
Most Linux distributions (quite understandably) would prefer that this project upstreamed the patches, and choose to compile without those features. This leads to quite different behavior – you get a later web engine, but behavior can vary from distribution to distribution.
Why are there no “generic” Linux builds (which were provided earlier)?
Although the builds are static, it is very important to understand what it means in the context of Qt – on which wkhtmltopdf is built. A static build means that only Qt is linked in this manner – the remaining system packages still need to be installed. Over a period of time, major areas of divergence between distributions were found by trial and error:
- different library versions: not every distribution provides the same versions. This was especially the case for libpng and libjpeg , with a lot of distributions choosing between the 1.2, 1.5 and 1.6 series for the former and multiple versions of libjpeg and/or its fork libjpeg-turbo . While this could be addressed easily by linking them statically (and was actually done so for previous releases) – it broke down when it came to the next point.
- different OpenSSL versions: due to OpenSSL having a bad track record then (it’s better now), distributions started aggressively upgrading their OpenSSL version and disabling unused parts of the library. This led to a situation where there was effectively zero backward compatibility and things started breaking randomly – see #3001 for a very long read of the problems faced. This was the direct motivation to create a separate packaging repository.
- incompatible libc: not every distribution has the same glibc version. If you compile with a later version, it won’t work on a distribution which uses an older version. This was worked around earlier by using CentOS 6 (which had an old enough glibc version). But due to the rise of Docker, the alpine image became very popular. This doesn’t use glibc at all, but the musl libc. So the generic binaries never really worked on Alpine.
While Python has also tried to do this using manylinux – it doesn’t always work well (e.g. alpine is not recommended with binary wheels if you google for it), and requires you to statically link everything. This may work for them, but wkhtmltopdf also depends on the runtime configuration on actual fonts installed (i.e. fontconfig and freetype2 ). It’s not possible to abstract everything out and test/fix everything for every OS/distribution with the limited resources this project has – it makes more sense to make distribution-specific versions which are almost guaranteed to work, as they use the specific versions that the distribution has packaged.
I don’t see an appropriate download for my platform!
If the distribution you are using is listed:
- but not the specific patch release – try it, as it’s very likely to work regardless.
- the major release isn’t listed – we only support LTS versions, so try a LTS version older than your release.
- cannot install package – you can always extract it (google for extract from ), but you’ll need to have the dependencies installed.
Head over to the packaging repository and start a discussion if your platform isn’t listed.
How do I use it with FaaS setups?
You’ll need to extract the distribution-specific package, bundle it with necessary libraries, configuration and/or fonts and then upload it. See this StackOverflow question for Google Cloud Functions. PRs are welcome to expand this section, if you have more information about this – this is not a setup that the maintainer uses 😄
How do I use it in AWS Lambda?
All files required for lambda layer are packed in one zip archive (Amazon Linux 2 / lambda zip). You may test it locally by unpacking the archive into the layer directory and running next commands:
After that, you may find a pdf file generated from the google home page in your layer directory.
To use wkhtmltox in your lambda function you may put the content of the archive together with your lambda function or create a layer. Don’t forget to provide an environment variable for fontconfig ( FONTCONFIG_PATH=/opt/fonts ).
In case you use Serverless framework you may add the next lines to your serverless.yml file:
Symantec reports a virus WS.Reputation.1 for the Windows builds
This is a false positive reported because Symantec has not seen this file before – see this clarification for details.
Источник
isogram / wkhtmltopdf_wkhtmltoimage.md
How to Install Wkhtmltopdf and Wkhtmltoimage in Ubuntu
This comment has been minimized.
Copy link Quote reply
ckarrie commented Nov 8, 2016
Great! Thank you!
This comment has been minimized.
Copy link Quote reply
bwasmith commented Jun 5, 2017
This comment has been minimized.
Copy link Quote reply
fliespl commented Jul 27, 2017
Another update:
https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
This comment has been minimized.
Copy link Quote reply
parhs commented Aug 17, 2017
Is only the bin needed?
This comment has been minimized.
Copy link Quote reply
zloynemec commented Sep 12, 2017
Updated script for 0.12.4:
This comment has been minimized.
Copy link Quote reply
smash-wp commented Oct 27, 2017
Little correction for comment above.
cd ./wkhtmltox — wrong version
cd ./wkhtmltox/bin — right version
This comment has been minimized.
Copy link Quote reply
kjellberg commented Apr 11, 2018
This comment has been minimized.
Copy link Quote reply
danielmcfarland commented Apr 25, 2018
Life saver, needed the latest version and this provided exactly what I needed
This comment has been minimized.
Copy link Quote reply
jiwom commented Jul 18, 2018 •
Thanks! Works for me. I just need to change the path to
sudo mv wkhtmltopdf /usr/local/bin/wkhtmltopdf
sudo mv wkhtmltoimage /usr/local/bin/wkhtmltoimage
and also put this on our server
sudo apt-get install libfontconfig1 libxrender1
Источник
Установка wkhtmltopdf & wkhtmltoimage в Ubuntu 20.04 | 18.04 / Debian 10 | 9
Установка wkhtmltopdf & wkhtmltoimage в Ubuntu 20.04 | 18.04 / Debian 10 | 9
В этом руководстве мы установим wkhtmltopdf и wkhtmltoimage в системе Ubuntu / Debian Linux. wkhtmltopdf и wkhtmltoimage — это инструменты командной строки с открытым исходным кодом (LGPLv3), используемые для рендеринга HTML в PDF и различные форматы изображений с помощью механизма рендеринга Qt WebKit.
Версии этих инструментов, доступные в системе Ubuntu / Debian Linux, старые. Чтобы установить последнюю версию wkhtmltopdf и wkhtmltoimage в Debian 10 / Ubuntu 20.04 / 18.04 Linux, вам необходимо вручную загрузить и установить из пакета .deb . Эти инструменты работают полностью « без головы » и не требуют отображения или службы отображения.
Установка wkhtmltopdf в Ubuntu 20.04 | 18.04 и Debian 10 | 9
Загрузите последний предварительно скомпилированный двоичный файл со страницы выпусков . Последний выпуск на момент обновления этой статьи — 0.12.6.
Установка wkhtmltopdf в Ubuntu 20.04 / 18.04
Результат успешной установки выглядит следующим образом.
Установка wkhtmltopdf в Debian 10 / Debian 9
Установите инструмент командной строки wget.
Установите wkhtmltopdf & wkhtmltoimage в Debian 10/9 Linux
Проверьте версию wkhtmltopdf и wkhtmltoimage, чтобы убедиться, что установка прошла успешно.
Использование wkhtmltopdf в Ubuntu / Debian
Например, если вы хотите преобразовать веб-страницу в PDF, используйте синтаксис команды:
Будет создан файл pdf, и вы можете открыть и просмотреть его содержимое.
Аналогичный синтаксис применяется при преобразовании в изображение.
Ознакомьтесь с руководствами, в которых используется инструментарий wkhtmltopdf.
Источник
How To Install wkhtmltopdf and wkhtmltoimage On Ubuntu 20.04
Today we are going to learn that how we can convert our web pages from html format to pdf or image format. For obtaining these results we’ll use the most famous command line tools wkhtmltopdf & wkhtmltoimage. They are Open Source Command line tools used for conversion processes from html to pdf and image respectively.Follow the guide to get started that how we can Install wkhtmltopdf & wkhtmltoimage on Ubuntu 20.04 Linux.
They both use the QT WebKit rendering engine to perform the actions.
By default, the versions available on Ubuntu are old for these tools. So, we have to Install them manually.
First of all we’ll download the tools from .deb package. Further these tools do not require a display so they are entirely headless.
Step 1: Update Your System
First of all update your system to have the latest updates installed.
Step 2:Install wkhtmltopdf on Ubuntu 20.04
On Ubuntu 20.04:
Verify the installed version by typing.
Ubuntu 18.04:
On Ubuntu 16.04:
Note:If you get error for the fonts try the following command.
You can see the following results upon successful Installation
Step 3: How to Use wkhtmltopdf on Ubuntu 20.04
Look at the example:
Execution Output:
A pdf file will be created and you can view the contents once it finished by typing
You can convert to image using the same syntax as:
Congratulations! You’ve learned how we can convert our web pages to pdf and Image format using wkhtmltopdf and wkhtmltoimage tool.
If you’ve any queries regarding this tutorial, feel free to ask!
Источник
Installing wkhtmltopdf on Ubuntu 14.04 and 16.04
Installing wkhtmltopdf on Linux can be a bit tricky, especially for people who are not so familiar with *nix operating systems. There are various ways in which you can install wkhtmltopdf; use a package manager such as apt-get , compile from source, or download the pre-compiled binary file. We are going to be doing the latter in this tutorial.
Now the installation instructions for wkhtmltopdf have changed over the years, but as of this writing, the commands that you are about to see work for Ubuntu 14.04 and Ubuntu 16.04.
Installing wkhtmltopdf Dependencies
First, we need to install a couple of wkhtmltopdf dependencies.
Downloading & Extracting Archive
Then we will download and extract an archive containing the binary file. Be sure to update the link to use whichever version you prefer. You can find the links on the download page over at wkhtmltopdf.org.
Moving Binary File & Permissions
Now we have a directory named wkhtmltox within our current working directory. This directory contains the binary file that we are looking for within the bin directory, namely wkhtmltopdf . We could just use that binary file from that directory as is, but we probably want to make wkhtmltopdf available throughout the system. To do that, we need to move it and give it permission to execute.
Testing wkhtmltopdf
You can test if wkhtmltopdf is working as intended by generating a PDF file with contents of google.com.
I will try to stay up to date with any changes, but these things change quite often. So if the above does not work out for you, please let me know in the comments.
Источник