To display the report using the custom fonts I.e new fonts which do not exist in the Jasper we have to use “font extensions” process. Using this we can add any kind of font in the report.
Here I am trying to use “Open Sans” font in the Jasper.
- Open the Jaspersoft studio and create a report with few text fields.
- Now click on any text field and try to choose the font style. “Open Sans” font is not available above the line. It means it is not installed in the Jaspersoft studio.
- To install the custom fonts in the Jaspersoft studio, open Jaspersoft studio -> Window -> Preferences.
- Click on Add from Path and choose the font extension folder from the device location. I have selected the ‘Open Sans’ font extension file and it will look like below. Click on Apply and OK
- Click on the Text field again, now we can see ‘Open Sans’ font above the line.
- Now we can add the custom font to any component in Jaspersoft studio.
- Here I have used ‘Open sans’ and bold on the columns in a table component to show column headings in bold format
- Published the report and verified. In Jasper server, all the column headers are coming in bold format
- But after exporting the report into pdf, the same column headers are not coming in bold format.
- To fix the above issue, we have to add font-extensions jar in the Jasper server.
- To export the jar, open Jaspersoft studio -> Window -> Preferences.
- Add the exported jar in jasper server lib folder.
- Restart the jasper server.
- Open the same report and export the report in pdf and check.
- Now the fonts are coming in bold in a PDF file.
Make data easy with Helical Insight. Helical Insight is world's best open source business intelligence tool.
Click Here to Free Download
In Preference select Jaspersoft Studio and click on fonts
Here we have the options to install fonts like from URL, select from the device folder or create new font family manually.
Make data easy with Helical Insight. Helical Insight is world's best open source business intelligence tool.
Sign Up for 30 Days Free Taril
In Preference select Jaspersoft Studio and click on fonts.
Select all the custom fonts which we added in the previous steps, click on the “Export” option present in the bottom. All the fonts will be exported in a jar file.
Path: …\jasper-server\apache-tomcat\webapps\jasperserver\WEB-INF\lib
In case if you have any queries please get us at support@helicaltech.com
Thank You
Ramu Vudugula
Helical IT Solutions Pvt Ltd
Best Open Source Business Intelligence Software Helical Insight Here
A Business Intelligence Framework
Best Open Source Business Intelligence Software Helical Insight is Here