cokelight88 Posted December 9, 2009 Share Posted December 9, 2009 I am using jasper report 3.6.0. I want to display a static text and text field that both contain chinese and english character. For testing, I type the string "我Gaddi's" in a static field. Then using the server (deployed an application to generate pdf in weblogic server 10) to generate the pdf file. The generated file shows "我Gaddi s" where the apostrophe is missing. Is there any suggest to fix it? The jrxml and the generated pdf is attached.I using the following setting:Pdf Font name MSung-LightPdf Embedded truePdf Encoding UniCNS-UCS2-H (Chinese traditional)jasperreport 3.6.0ireport 3.6.0weblogic server 10java 1.5 Link to comment Share on other sites More sharing options...
glassesbamboo Posted December 9, 2009 Share Posted December 9, 2009 because of your Pdf Font name settings.:)别用这个å—体就好了。哈哈。 Link to comment Share on other sites More sharing options...
cokelight88 Posted December 10, 2009 Author Share Posted December 10, 2009 I tried all fonts in ireport, only 2 font support chinese character( "MHei-Medium" and "MSung-Light") and both of them cannot display apostrophe. Is there any method to import font for gnerating pdf file? Link to comment Share on other sites More sharing options...
Teodor Danciu Posted December 10, 2009 Share Posted December 10, 2009 Hi, Check the /demo/samples/unicode sample provided with JasperReports. You'll see it displays some Chinese characters (try a recent version of JR).That sample uses an open source Chinese TrueType font called "AR PL KaitiM GB". See if in that sample, your apostrophe character works. It would be interesting to see the code of your character. Maybe it is not the ASCII one, but rather a special apostrophe, not supported by the fonts you used. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
waybillmak Posted December 14, 2009 Share Posted December 14, 2009 Hi,I found that I'd the same problem running Jasperreport with output field having mixed English and Chinese characters for a while. My generated jasperreport output in pdf seems to have its ( ' ) disappeared when it is viewed using Acrobat Reader 8.0.However, the same file viewed by Evince in Linux environment does show the ( ' ). It means that the ( ' ) exists in the generated pdf output. Then, I update Acrobat Reader 8.0 to Acrobat 9.2, and the ( ' ) shows up in the pdf output.Note: Using mixed characters (English and Chinese) in the same output field, Jasperreport DOES NOT do a very good job on handling long field wrap around lines. Sometimes, it just truncates some characters till the end instead of wrap around.Waybill MakHong Kong Link to comment Share on other sites More sharing options...
Teodor Danciu Posted December 14, 2009 Share Posted December 14, 2009 Hi, You jumped to the conclusion that JR does not do a very good job with mixed language text fields.It would be good to see your report template and see what fonts you use, so that we can say if you do a good job at configuring the fonts in your report. Thanks,Teodor Link to comment Share on other sites More sharing options...
ajay.mohite2 Posted January 18, 2013 Share Posted January 18, 2013 I still have one doubt here, You can set pdfFontname ONLY if you know exactly which language the data is coming from.But lets suppose in my application user can have his personal details entered in either english or chinese or korean or thai etc.. and i need to generate PDF of personal details then setting pdfEncoding to specific chinese language will not help here. correct? is there any GENERIC way to handle internationalisation? Link to comment Share on other sites More sharing options...
ajay.mohite2 Posted January 18, 2013 Share Posted January 18, 2013 I still have one doubt here, You can set pdfFontname ONLY if you know exactly which language the data is coming from.But lets suppose in my application user can have his personal details entered in either english or chinese or korean or thai etc.. and i need to generate PDF of personal details then setting pdfEncoding to specific chinese language will not help here. correct? is there any GENERIC way to handle internationalisation? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now