IText - Generating PDF with Chinese characters (Chinese Simplified)

前端 未结 2 1799
萌比男神i
萌比男神i 2021-01-28 04:31

I am using iText to generate some PDFs, these pdfs have some Chinese characters (Simplified Chinese - GB2312), however I am unable to generate a pdf with these characters.

2条回答
  •  情书的邮戳
    2021-01-28 04:40

    You have the iText jar in your CLASSPATH, but you forgot to add the (correct) itext-asian.jar.

    Please download version 2.3 of the extra jars ZIP-file that is available here: http://sourceforge.net/projects/itext/files/extrajars/

    This jar contains metrics for Chinese glyphs. Such a font will never be embedded. When you open a document using such a font in Adobe Reader, you may be asked to install an extra font pack.

提交回复
热议问题