I recently used ireport as a report. I found that Chinese characters cannot be displayed in the report in PDF format, and finally I found the font setting problem.
The solution is as follows:
--- The following is the reprinted content
Download itext's Asian Language Pack itextasian. jar and add it to classpath. It is also placed in the lib directory of ireport.
In the font option of ireport, select stsong-light for PDF Font Name, and select UniGB-UCS2-H for PDF encoding. Select PDF embedded.
In this way, the PDF can display Chinese characters. (Reference from http://www.blogjava.net/kxx129/archive/2009/08/25/292518.html)
--- Reposted content ended
In addition, you can use the following methods to display the report title in Chinese:
New String (documentname. getbytes (), "iso8859-1 ");
Solve the problem after converting the Encoding