Priya Rajaram
Priya Rajaram

Reputation: 360

How to create PDF with Multiple Languages (English, German) dynamically using DOMPDF

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

Answers (1)

Abhijith Sasikumar
Abhijith Sasikumar

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

Related Questions