Adding New Custom Fonts in Jaspersoft Studio and Jasper Server

Posted on by By Ramu Vudugula, in Jaspersoft | 0

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.

  1. Open the Jaspersoft studio and create a report with few text fields.
  2. 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.
  3. To install the custom fonts in the Jaspersoft studio, open Jaspersoft studio -> Window -> Preferences.
  4. 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.

  5. 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
  6. Click on the Text field again, now we can see ‘Open Sans’ font above the line.
  7. Now we can add the custom font to any component in Jaspersoft studio.
  8. Here I have used ‘Open sans’ and bold on the columns in a table component to show column headings in bold format
  9. Published the report and verified. In Jasper server, all the column headers are coming in bold format
  10. But after exporting the report into pdf, the same column headers are not coming in bold format.
  11. To fix the above issue, we have to add font-extensions jar in the Jasper server.
  12. Make data easy with Helical Insight.
    Helical Insight is world's best open source business intelligence tool.
    Sign Up for 30 Days Free Taril

  13. To export the jar, open Jaspersoft studio -> Window -> Preferences.
  14. 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.

  15. Add the exported jar in jasper server lib folder.
  16. Path: …\jasper-server\apache-tomcat\webapps\jasperserver\WEB-INF\lib
    
  17. Restart the jasper server.
  18. Open the same report and export the report in pdf and check.
  19. Now the fonts are coming in bold in a PDF file.

In case if you have any queries please get us at support@helicaltech.com

Thank You
Ramu Vudugula
Helical IT Solutions Pvt Ltd

logo

Best Open Source Business Intelligence Software Helical Insight Here

logo

A Business Intelligence Framework


logo

Best Open Source Business Intelligence Software Helical Insight is Here

logo

A Business Intelligence Framework

5 1 vote
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments