Tuesday, October 23, 2018

wkhtmltopdf and Chinese Characters

On a CentOs box, in order to display Chinese characters in a PDF generated using wkhtmltopdf, you would have to take note of the following:-
  1. Make sure that you have installed the Chinese character fonts. The below command will install all fonts available and would cover fonts for other languages.
    yum groupinstall -y "fonts"
    
  2. Make sure that your HTML is able to display UTF-8 content.
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.