Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wkhtmltopdf footer-html encoding utf-8

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 enter image description here

like image 797
Ahmed Abdullah Saeed Avatar asked Jan 30 '14 11:01

Ahmed Abdullah Saeed


1 Answers

Try adding the following line in the HTML head element of the footer:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
like image 119
martin Avatar answered Oct 07 '22 01:10

martin