Sunday, January 29, 2017

JasperReportsIntegration fonts issue

Out of the box, ireports on the server can only render a few fonts, e.g. Deja Vu, SansSerif. Anything beyond that will give you a nasty "JRFontNotFoundException" error at runtime.

To fix this, you need to install the fonts on the server side.
  1. Add all the fonts required to iReports, Tools->Options->Fonts->Install Font
  2. Check Embedded font in PDF
  3. On the same screen, highlight all the newly added fonts, hit "Export as extension", give it a name like "apex-fonts.jar".
  4. Copy this apex-fonts.jar file to this server location
    /usr/local/tomcat/webapps/JasperReportsIntegration/WEB-INF/lib
  5. Restart Tomcat

No comments:

Post a Comment