Displaying embedded fonts with PDFBox and Swing

微笑、不失礼 提交于 2019-12-07 02:33:28

pdfbox is not able to parse embedded subsets of TrueType fonts.

As far as I understand it, embedded TrueType subsets are missing some metadata for the font file that pdfbox needs.

The bug is known but not easy to solve. Right now I can only advise to use embedded Type 1 Fonts if possible, pdfbox can deal with them.

You can also try to set the path to your complete font files in your pdfbox.jar under org/apache/pdfbox/resources/PDFBox_External_Fonts.properties, so if pdfbox cannot parse the subset, at least it can find a full path to the original font file. Maybe that works, but I have not tested this.

Good Luck!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!