问题
I had a Grid that contain a chinese language. The problem occur when I want to export the data into PDF. It seem appear a weird characters (image below) or something like this . Can anyone help me to solve the issue?
Here I provide a DEMO in dojo
回答1:
Found a solution, using kendo.pdf.defineFont
- I need to download Arial Unicode MS font then place into a folder.
- By using defineFont I used this code.
<script>
kendo.pdf.defineFont({
"Arial Unicode MS" : " +your url path+ / +font folder location+ "
//eg. "Arial Unicode MS" : "myUrl/fonts/arialunicodems.ttf"
});
</script>
Hope this can help.
回答2:
As per documentation, https://demos.telerik.com/kendo-ui/grid/pdf-export for unicode support you need to use custom fonts. The code which you shared is in online is not loading.
来源:https://stackoverflow.com/questions/56318953/export-to-pdf-with-chinese-languages