Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Using Calibri/customized Fonts in PDF generation #36

#1

I have a requirement to generate the PDF document with “Calibri” font through the JRI. But the default installation does not run using the same.

Error --> “Font Calibri is not available to the JVM. See the Javadoc for more details.”

I tried using jasper font extensions through ireport 5.6. But it did not help.

  1. Installed the Calibri font ttf file in ireport 5.6. Used the font in the jasper template.
  2. Exported the font jar file.
  3. Put that in the lib folder (/jri-2.7.0-jasper-6.16.0/lib)

Any idea how can I solve this error. I usually get requirement for different customized fonts in PDF reports as per client requirements.

  • replies 2
  • views 801
  • likes 0
#2

Hi,

I will have a look at it next week.

Best
~Dietmar.

#3

Hi @SubhajeetG ,

sorry that it took so long.

I have investigated it and tested a bit more. The easiest instructions are these: https://community.jaspersoft.com/wiki/custom-font-font-extension

Once you have exported your font extension into a .jar file, it needs to be accessible through the classpath of your application server. I assume you could add it to the tomcat_home/lib directory.

But you can also add it to the jri.war file itself and add it into the WEB-INF/lib directory with the other .jar files.

I have tested it, it worked for me.

Calibri is a different beast. This is typically done on the operating system level. On Windows, it should already be available. On Linux, there are packages, for installing the Microsoft office fonts.