0

I'm creating an app where I have to generate a PDF of a React Component say ABC. The component ABC has both English and Tamil text in it. When I try to generate the component using the @progess/kendo-react-pdf package, the Tamil font isn't rendered properly. Some random characters are printed in the PDF.

For Reference, check out this code

Fatemeh Abdollahei
  • 3,040
  • 1
  • 20
  • 25

1 Answers1

0

Enable the embedding of fonts by obtaining and hosting the .ttf files and declaring the URLs

https://www.telerik.com/kendo-react-ui/components/drawing/pdf-output/embedded-fonts/

Define the fonts, use the @font-face CSS declarations

@font-face {
    font-family: "DejaVu Sans";
    src: url("fonts/yourFont.ttf") format("truetype");
  }
CMartins
  • 3,247
  • 5
  • 38
  • 53