Export to PDF with Chinese languages

跟風遠走 提交于 2019-12-24 12:35:11

问题


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

  1. I need to download Arial Unicode MS font then place into a folder.
  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!