Jump to content
We've recently updated our Privacy Statement, available here ×

Dynamic Font Name on Jasper PDFs


srinathmahe

Recommended Posts

I am using Jasper jar to generate report on my j2EE project. I am able to generate the pdfs successfully without any issues. However I want the font name to be dynamically changed for all my pdfs based on settings which we configure on one place.
I came to know Conditional style which is useful to accomplish this. However I do have hunderds of fonts which cannot be conditionaly styled on each and every place. This will make the report more worst. I am looking for a suitable solution which helps me to change the fonts on jasper pdfs dynamically. 
Any helps will be always appriciated.
Thanks in Advance.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Seems strange to have hundreds of fonts inside one report - maybe you are talking about text fields or static text components inside report? If that is the case than you can have couple of conditional styles which change font name depending on report parameter for example: just set "Conditional expression" parameter of conditional style to "$P{FONT_NAME_PARAMETER} == "Arial"", and set Font property to Arial for example.

That way you could have configuration in one place and use it through report parameters when calling report.

HTH

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...