Adding fonts to Jasper Reports Integration
Published on: Author: Team Communication Category: IT development and operationsIn Oracle Application Express there are a lot of ways to create reports. One easy way to create sleek reports is by using the Jasper Reports Integration.
With this plugin, reports can be easily created in WYSIWYG mode with Jasper Ireport. You can connect Ireport to your database, create your report and view it as it would show up in your application, or how it would be printed. The issue we came upon was when we used the Times New Roman font. On our developers laptops the reports were created with this font. But when copied to the Jasper server and opened using the application, the font would get substituted with a different font.
After doing exhaustive searching on the web we finally worked out how to add Times New Roman to the Jasper server. Now our reports show just as the developers created it. The steps to add a new font to the Jasper Server are explained in this blog.
- Download your font
- Install font in Ireport: Tools - Options - Tab Ireport - Subtab Fonts - Install Font
- Now you will be able to choose the font for your reports in Ireport
- From the same page, export font as extension
- Add extension in Classpath: Tools - Options - Tab Ireport - Subtab Classpath - Add Jar
- Now go to the folder where you exported the font as an extension. Extract the jar into a folder
- Open WinScp and go to the Jasper server. Copy extracted files into the folder: /tomcat/webapps/JasperReportsIntegration/WEB-INF/classes
- Restart Tomcat
- Now your PDF files should be printed in the specified new installed font