本文介绍了以中文导出为PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含中文的表格.当我想将数据导出到PDF时会出现问题.似乎出现了一个奇怪的字符(下图)或类似的东西.谁能帮我解决问题?

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?

在此我在dojo中提供了一个演示版

推荐答案

使用 kendo.pdf.defineFont

  1. 我需要下载 Arial Unicode MS 字体,然后放入文件夹中
  2. 通过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>

希望这会有所帮助.

这篇关于以中文导出为PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 13:22
查看更多