首页 > 解决方案 > itext lowagie 版本:'2.1.7' 将支持pdf的中文翻译

问题描述

我正在使用 itext lowagie 版本:'2.1.7' 我可以在 pdf 导出中翻译法语、西班牙语和意大利等。但是中文简体和中文繁体不能翻译成PDF。

标签: pdfitext

解决方案


让我们看看我们的玻璃球:很可能您缺少包含所有必要 cmap 等的附加 itext-asian.jar。

https://mvnrepository.com/search?q=iTextAsian

因此,例如,如果您使用 Maven,这将起作用:

<dependency>
    <groupId>cn.lesper</groupId>
    <artifactId>iTextAsian</artifactId>
    <version>3.0</version>
</dependency>

或者,如果您能够找到它:

<dependency>
    <groupId>com.lowagie</groupId>
    <artifactId>itextasian</artifactId>
    <version>1.5.2</version>
</dependency>

推荐阅读