pdf - itext lowagie 版本:'2.1.7' 将支持pdf的中文翻译
问题描述
我正在使用 itext lowagie 版本:'2.1.7' 我可以在 pdf 导出中翻译法语、西班牙语和意大利等。但是中文简体和中文繁体不能翻译成PDF。
解决方案
让我们看看我们的玻璃球:很可能您缺少包含所有必要 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>
推荐阅读
- machine-learning - 插补仅用于特征选择步骤,但不适用于 sklearn 管道中的模型输入
- c# - 如何在不同控制器的视图中显示计数
- javascript - 上传图片然后使其可移动和可调整大小
- java - EditTextPreference 不适用于字符串
- c++ - 在 Visual Studio 2015 上使用多个运行时库
- graphql - proxy.writeQuery 奇怪的行为
- python - Matplotlib 条形图 X 轴标签顺序
- android - 如何解决 Unable to resolve dependency for ':@debug/compileClasspath': Could not resolve com.google.auto.value:auto-value-annotations:1.6.5
- java - 使用 Gmail API 将请求正文写入服务器时出错
- c# - 对资源的有效锁定,由字符串标识