After some research I got the PDF creation working flawlessly. I found out that the installed version of wkhtmltopdf is the NON-qt-patched version. But the qt-patched version is needed in order to generate correct PDF files from the document preview.
The “sudo apt-get wkhtmltopdf” for Ubuntu 22.04 variant installs the non-qt-patched version. This one does not support the parameter " --disable-smart-shrinking".
Therefor all PDF files are truncated, shrunk, at the edges, even removing logos or text.
The preview is correct, the created pdf file is mistakenly shrunken / cut.
I solved it with these commands:
remove bad version
sudo apt-get remove wkhtmltopdf
download the latest, qt-patched version from the official github
visit wkhtmltopdf website to see for other distros
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
install correct version with qt-patched and check if it works
sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb
vvv@gggg:~$ wkhtmltopdf -V
wkhtmltopdf 0.12.6.1 (with patched qt)
After this PDF files are correctly generated.
BTW: I tried to do “sudo bench install wkhtmltopdf” but this only threw errors at the end.