Reputation: 360
I am using the DOMPDF library to create PDF. This document can be in English, German or Spanish dynamically. How can i achieve this with DOMPDF?
Can i get any help?
thanks.
Upvotes: 0
Views: 1542
Reputation: 14980
If you are trying to convert html to pdf, use utf-8 encoding like the below:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<p style="font-family: firefly, verdana, sans-serif;">
Spanish: El veloz murciélago hindú comía feliz cardillo y kiwi. La cigüeña tocaba el saxofóndetrás del palenque de paja.
</p>
<p style="font-family: firefly, verdana, sans-serif;">
German: Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich
</p>
<p style="font-family: firefly, verdana, sans-serif;">
English: The quick brown fox jumps over a lazy dog
</p>
</body>
</html>
Upvotes: 1