wkHTMLtoPDF on Debian 12 giving '… is not support using unpatched qt' error

I have been able to install and use wkHTMLtoPDF in my macOS and Windows apps for years, but now I want to install it on my x86-based Debian 12 REST server. While it is installed and running, whenever I try to use a switch in the command line (eg … --disable-external-links …) it gives the error ‘… is not support using unpatched qt’ for every switch ie

wkhtmltopdf --page-size A4 --load-error-handling abort --enable-smart-shrinking --margin-top 10 --margin-bottom 10 --minimum-font-size 10 --disable-javascript --disable-external-links --header-spacing 3 --header-font-size 10 --header-line --header-center "My PDF Title" --footer-spacing 3 --footer-font-size 8 --footer-line --footer-left "[date] [time]" --footer-right "Page [page] of [toPage]" --encoding UTF8 --orientation Portrait test.html test.pdf

creates a PDF (without the switch features) but returns the error:

The switch --enable-smart-shrinking, is not support using unpatched qt, and will be ignored.The switch --disable-external-links, is not support using unpatched qt, and will be ignored.The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-font-size, is not support using unpatched qt, and will be ignored.The switch --header-line, is not support using unpatched qt, and will be ignored.The switch --header-center, is not support using unpatched qt, and will be ignored.The switch --footer-spacing, is not support using unpatched qt, and will be ignored.The switch --footer-font-size, is not support using unpatched qt, and will be ignored.The switch --footer-line, is not support using unpatched qt, and will be ignored.The switch --footer-left, is not support using unpatched qt, and will be ignored.The switch --footer-right, is not support using unpatched qt, and will be ignored.Loading page (1/2)  
Printing pages (2/2)                                               
Done

I have tried both ‘wkhtmltox_0.12.6.1-2.bullseye_amd64.deb’ and ‘wkhtmltox_0.12.6.1-2.bullseye_i386.deb’ but both give the same error.

I have searched the internet and tried to find out how to ‘patch qt’ without success.

Has anyone managed to get wkHTMLtoPDF working fully on Debian 12?

Debian 12 is bookworm, no?

Did you try installing this version?

https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bookworm_amd64.deb

From this page:

It looks like you have to actually build wkhtmltopdf with the correct patched version of qt.

Thank you @AlbertoD, that worked!

1 Like