Kendo-angular: [Grid] PDF export with wrong encoding

Created on 20 Jul 2017  路  3Comments  路  Source: telerik/kendo-angular

In our project we use grid for PDF export. I strictly followed your example, but we have an encoding problem. Some accents are replace by the empty symbol.

Data displayed throught the grid component :
image
And here the data exported into the PDF file :
image

@progress/kendo-angular-grid: 1.1.2
@progress/kendo-drawing: 1.1.1

If I try to put accent into the footer, I've got the same result.
Any clue ?

Question grid

Most helpful comment

Problem solved : I haven't noticed that we used a custom font for our grid. I needed to use CSS @font-face :

@font-face {
  font-family: "open sans";
  src: url("/assets/css/fonts/Open-Sans/open-sans.ttf") format("truetype");
}
@font-face {
  font-family: "open sans";
  font-weight: bold;
  src: url("/assets/css/fonts/Open-Sans/open-sans.bold.ttf") format("truetype");
}
@font-face {
  font-family: "open sans";
  font-style: italic;
  src: url("/assets/css/fonts/Open-Sans/open-sans.italic.ttf") format("truetype");
}
@font-face {
  font-family: "open sans";
  font-weight: bold;
  font-style: italic;
  src: url("/assets/css/fonts/Open-Sans/open-sans.bold-italic.ttf") format("truetype");
}

I'm closing this issue, thanks for your help !

All 3 comments

Please make sure that you're embedding fonts with Unicode support. See Custom Fonts.

I don't embed any fonts in our application. So you say that standard PDF fonts don't support Unicode ?

Problem solved : I haven't noticed that we used a custom font for our grid. I needed to use CSS @font-face :

@font-face {
  font-family: "open sans";
  src: url("/assets/css/fonts/Open-Sans/open-sans.ttf") format("truetype");
}
@font-face {
  font-family: "open sans";
  font-weight: bold;
  src: url("/assets/css/fonts/Open-Sans/open-sans.bold.ttf") format("truetype");
}
@font-face {
  font-family: "open sans";
  font-style: italic;
  src: url("/assets/css/fonts/Open-Sans/open-sans.italic.ttf") format("truetype");
}
@font-face {
  font-family: "open sans";
  font-weight: bold;
  font-style: italic;
  src: url("/assets/css/fonts/Open-Sans/open-sans.bold-italic.ttf") format("truetype");
}

I'm closing this issue, thanks for your help !

Was this page helpful?
0 / 5 - 0 ratings