DEV Community

radin reth
radin reth

Posted on

3 2

wicked pdf does not render UTF-8

Unicode characters does not render properly when generate pdf using wicked pdf. There are 3 steps need to follow:

  1. Set encoding: 'utf8'
render pdf: "myfile",
       ....,
       encoding: 'utf8',
       ...
Enter fullscreen mode Exit fullscreen mode
  1. Make sure to render proper meta tag in layout template
%meta{:content => "text/html; charset=utf-8", "http-equiv" => "content-type"}
%meta{:charset => "utf-8"}
Enter fullscreen mode Exit fullscreen mode
  1. Install system fonts
apt-get install fonts-khmeros
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay