Set PDF Font at Runtime in Jasper Report

Set PDF Font at Runtime in Jasper Report

Posted in the Jasper Forum



#1 Oct 5, 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.toStrin g())?($R{
bel}.setPdfFontName("msmi ncho.ttc")):($R{part.labe l}.setPdfFontName("Verdan a
However, This thing does not work as partlabel string does not have a method
like setpdffontname.
Please help me, it's very urgent.
I have been trying for long for this to happen.
Thanks & Regards,

Tell me when this thread is updated:

Subscribe Now Add to my Tracker

Add your comments below

Characters left: 4000

Please note by submitting this form you acknowledge that you have read the Terms of Service and the comment you are posting is in compliance with such terms. Be polite. Inappropriate posts may be removed by the moderator. Send us your feedback.

Jasper Discussions

Title Updated Last By Comments
narc snitch (Nov '16) Oct 13 Chrissy 7
96.5/106.1 The Jet Sep 30 Anonymous 1
Theft at local hotel Sep 23 Inquiring Minds 1
angelo mitchell Sep 19 borderguard 1
Reward Sep 19 borderguard 2
Judge Robert Foster (Nov '15) Sep '17 Devon 6
Randy Harris (Nov '16) Aug '17 Rickety Ann 9

Jasper Jobs

More from around the web

Personal Finance

Jasper Mortgages