如何使用PDFBox生成PDF,该PDFBox应该在同一页面中包含拉丁/亚洲/Arbian Charaters?
几天以来,我尝试从数据提取中生产一个新的PDF文件,其中包含具有不同字体的值。我主要有拉丁字符,但是我的字符串列表中的某些名称是中文或西里尔等人物。
我在Google或Stackoverflow上花费了大量时间和精力,但仍然无法生产它(Glyphe问题)。 当前,我在Windows上,但将部署在Linux上,我使用PDFBox的2.0.26或3.0.0-RC1版本。
我设法加载TTF这样的加载:
PDType0Font.load(doc, File("src/main/resources/font/LiberationSans-Regular.ttf").inputStream(),false)
如果在任何情况下我都设置为嵌入式嵌入,我会发现CMAP的问题。
我还尝试加载TTC文件,但每次都失败了。
我已经开始实现此解决方案 link ,但我不设法init Init Init /正确加载我的字体
您有任何想法吗?
最好,垫子
I try since few days to produce a new pdf file with pdfbox from a data extraction which contains values with different fonts. I have mainly latin characters but some names in my list of strings are in chinese or cyrillic, etc, characters.
I have spent lots of time and energy on google or stackoverflow but still don t manage to produce it(glyphe issue).
Currently, I m on Windows but will be deployed on Linux, and I use the version 2.0.26 or 3.0.0-RC1 of pdfbox.
I m manage to load ttf like that:
PDType0Font.load(doc, File("src/main/resources/font/LiberationSans-Regular.ttf").inputStream(),false)
if I set true to embedded in any cases, I got an issue of cmap.
I also tried to load ttc files but failed each time.
I have already started to implement this solution link but I don t manage to init/load correctly my font
Do you have any idea to do it?
Best, Mat
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论