wkhtmltopdf --encoding utf-8 is not working for --footer-html.
I am using the following command. Both HTML files are also in utf8 format.
wkhtmltopdf --dpi 120 -O Portrait --encoding 'utf-8' --footer-html /tmp/testFooter.html /tmp/testMain.html /tmp/testPDF.pdf
Both files have french characters. But in pdf footer have bad characters.
<html>
<head>
<title></title>
</head>
<body>
<div style="width:95%;font-size:9pt;font-family:Arial;">
<div style="border-top: 1px solid black;width: 100%;text-align: center;">
test - Guérin 691BANNE - FRANCE - SA au capital 0 Euros -737 729 - Téléphone : 86 03</div></div>
</body>
</html>
Following image is output
Try adding the following line in the HTML head element of the footer:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Make sure you have specific font installed there. I need Hindi (Indian Language) on my PDF files. putting meta tag had not solved my problem. So i installed hindi fonts on my debian box by
sudo apt-get install fonts-indic
来源:https://stackoverflow.com/questions/21455779/wkhtmltopdf-footer-html-encoding-utf-8