An open-source command-line tool to convert HTML documents or web pages into PDF files. More information: https://wkhtmltopdf.org/.
wkhtmltopdf input.html output.pdf
PaperSize
of QPrinter
for supported sizes):wkhtmltopdf --page-size A4 input.html output.pdf
wkhtmltopdf --margin-top|bottom|left|right 10mm input.html output.pdf
wkhtmltopdf --orientation Landscape|Portrait input.html output.pdf
wkhtmltopdf --grayscale input.html output.pdf