Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jasper reports jasper pdf报告中打印泰语字符的问题_Jasper Reports - Fatal编程技术网

Jasper reports jasper pdf报告中打印泰语字符的问题

Jasper reports jasper pdf报告中打印泰语字符的问题,jasper-reports,Jasper Reports,我面临打印包含泰文或中文字符的jasper pdf报告的问题。报告正在生成,但它显示的是泰文字符????符号。您需要为泰语/汉语字符添加ttf字体作为扩展名 最简单的方法是通过 下载(或在pc上使用)所需的ttf字体(针对特定语言) 在ireport中安装字体 导出字体扩展名(这将创建一个.jar) 将jar添加到类路径中 这是这些步骤的链接,在 我会尝试PDF编码:Idenity-H(带水平书写的unicode) http://jasperreports.sourceforge.net/xsd

我面临打印包含泰文或中文字符的jasper pdf报告的问题。报告正在生成,但它显示的是泰文字符????符号。

您需要为泰语/汉语字符添加ttf字体作为扩展名

最简单的方法是通过

  • 下载(或在pc上使用)所需的ttf字体(针对特定语言)
  • 在ireport中安装字体
  • 导出字体扩展名(这将创建一个.jar)
  • 将jar添加到类路径中
  • 这是这些步骤的链接,在

    我会尝试PDF编码:Idenity-H(带水平书写的unicode)

    http://jasperreports.sourceforge.net/xsd/jasperreport.xsd“name=”jasper_report_template“pageWidth=“595”pageHeight=“842”whenNoDataType=“nopage”columnWidth=“515”leftMargin=“40”rightMargin=“40”topMargin=“50”bottomMargin=“50”uuid=“e35f5797-7de3-4d8d-ba9e-5320acff8a13”>
    ]>
    

    首先,您需要遵循本指南。

    如果使用maven,则需要将以下依赖项添加到pom.xml文件中

            <dependency>
                <groupId>com.test</groupId>
                <artifactId>arialunicode</artifactId>
                <version>1.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>3.2.2.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>3.2.2.RELEASE</version>
            </dependency>
    

    现在你需要建立你的项目,它应该是好的。

    现在我通过把ARIAUnicode jar放在我的类路径中,并通过设置PDF编码:身份HGOD,考虑接受发布的答案或者发布自己的答案,这样问题就可以关闭了,谢谢。
            <dependency>
                <groupId>com.test</groupId>
                <artifactId>arialunicode</artifactId>
                <version>1.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>3.2.2.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>3.2.2.RELEASE</version>
            </dependency>
    
    mvn install:install-file -DgroupId=com.test -DartifactId=arialunicode -Dpackaging=jar -Dversion=1.0.0 -Dfile=arialunicode-1.0.0.jar -DgeneratePom=true