mana_singh01 Posted October 6, 2006 Share Posted October 6, 2006 Hi all, I have a requirement for i18n.My reports have to be in english & japaneese both & they are exported in pdf& xls.For a text field I want to have a different font for the different locale. I am trying to do something like this in text field expression: ($P{REPORT_LOCALE}.toString().equals(Locale.JAPANESE.toString())?($R{part.label}.setPdfFontName("msmincho.ttc")):($R{part.label}.setPdfFontName("Verdana.ttf"))) However, This thing does not work as partlabel string does not have a methodlike setpdffontname. Please help me, it's very urgent. I have been trying for long for this to happen. Thanks & Regards,MS. Link to comment Share on other sites More sharing options...
Teodor Danciu Posted October 6, 2006 Share Posted October 6, 2006 Hi, The question is: do you have text fields that sometimes display English and other times display Japanese?Or can you say that English and Japanese text fields are separate and always display text in the same language? If they are separate, then you can define special fonts for each of the two text fields types. Fonts to be used by English text fields and fonts to be used by Japanese text fields. Those fonts (or rather report styles as they are known lately) can have the appropriate pdfFontName, pdfEncoding and isPdfEmbedded attributes. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
mana_singh01 Posted October 9, 2006 Author Share Posted October 9, 2006 Hi Teodord, Thanks a lot for your reply.I will explain my requirement a bit more.I know I can set the pdffontname etc for a text field. In my application there are two locales. one is english & the other is japaneese. So, when the locale is english the reports come up fine with verdana as font.(I have downloaded verdana.ttf as my pdffont.) However, this font does not show japaneese characters when the locale is japan & report reads the japaneese property file. For that if I make my pdf font as MSMincho or MsGothic...the report displays in both english & japaneese(as per the locale). However, my client does not want the font to be MSMincho for english reports. He wants the font to be vardana if the locale is english & MSMnicho when the locale is Japan. Would u suggest me a way to solve this problem?Please help Teodor. Thanks & Regards,MS. Link to comment Share on other sites More sharing options...
Teodor Danciu Posted October 11, 2006 Share Posted October 11, 2006 Hi, As I mentioned on the other message post, you should map the fonts at export time using the FONT_MAP exporter parameter, like shown in the /demo/samples/fonts sample provided with the project.With font maps you have the chance of changing the PDF related font settings depending on the locale. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
ankit.agarwal Posted March 24, 2008 Share Posted March 24, 2008 Hi teodard,, i have been using ireport for the generation of reports in pdf.. but lately i have been facing this problem of translation of my report in japanese in pdf.. please help. i have tried everything. searched a lot.. but didnt get any result 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