Installation and Use of iReport4.5.1 fonts and handling of pdf Fonts
To use additional fonts, you must add a font file. This article applies:
1.pdf Chinese Garbled text, pdf Chinese not displayed
2. Use the new font file and install it in jasper
3. Solve exceptions caused by the latest jar files and the jar packages of iText of different versions
For pdf Processing, we use open-source iText.
The procedure is as follows:
① Select Tools --> and open the following panel.
Then select Install Font
650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/121J322P-0.png "/>
② Select the font file location. Select the font file under your operating system.
C: \ windows \ fonts \ simfang. ttf font.
650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/121J33516-1.png "/>
③
SelectPDF Encoding -- "Identity-H
Check Embed this font in the pdf document
650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/121J34I6-2.png "/>
④. The next few steps are all the way to next.
⑤ Export the font to a jar file, and then put the font file into our project,
SelectExport as extension
650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/121J363X-3.png "/>
⑥ Select the storage location. This jar file needs to be introduced in the classpath of iReport.
650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/121J35358-4.png "/>
Finish
650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/121J36008-5.png "/>
In addition: for pdf Processing, the previous article has mentioned several jar files. Here, the next statement is as follows:
Latest Version of iText: itext-5.3.2
Another jar file is required for processing Chinese characters.
Extrajars-2.2 located under itext-asian.jar
The http://sourceforge.net/projects/itext/files/ of the two files
One in iText and one in extrajars
650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/121J3L62-6.png "/>
Note: Some of the old articles may have been written by some authors in the past, for the iReport-4.5.4, some of the jar files used to deal with pdf Chinese has been changed, modified, therefore, use the latest jar file to ensure that the project runs properly!
Now, you should have learned how to process Chinese characters using jasper.
This article from the ghost Conan technology blog, please be sure to keep this source http://enetq.blog.51cto.com/479739/975303