Frappe requires a version of wkhtmltopdf with QT patched support read here
The wkhtmltopdf shipped with Ubuntu/Debian has no QT patched, so some functionalities don’t work. You have to install one manually from github wkhtmltopdf
But the last versione is only compatible with Ubuntu 22 LTS and not Ubuntu 24…