java itext 报错 com.itextpdf.text.DocumentException: Font 'STSong-Light' with 'UniGB-UCS2-H'
com.itextpdf.text.DocumentException: Font 'STSong-Light' with 'UniGB-UCS2-H'
解决方案
<dependency> <groupId>com.itextpdf</groupId> <artifactId>itextpdf</artifactId> <version>5.4.3</version> </dependency> <!-- https://mvnrepository.com/artifact/com.itextpdf/itext-asian --> <dependency> <groupId>com.itextpdf</groupId> <artifactId>itext-asian</artifactId> <version>5.2.0</version> </dependency>
可能是 itext-asian版本与com.itextpdf有对应关系问题。itext-asian使用5.1.0就会报上面的错误