0

I'm getting an net.sf.jasperreports.engine.util.JRFontNotFoundException. I've already added the font in Jaspersoft Studio like how it was described here: When export a report to PDF change the font .

I've also exported the font extension and placed the jar where my classpath can see it like how it was described here: How can I display "$£Ω€απ⅔" in Jasperserver PDF using iReport? .

I'm still getting the error. Does anybody know any other solution that might help? Thanks in advance.

blah
  • 101
  • 2
  • 10

2 Answers2

0

I ran into similar problem. The cause of my problem was that the font I was trying to use was installed on my computer (Windows) but was not installed on our deployment environment (Linux). So the problem occurred on Linux. So we needed simply to install required font on that system. (The problem occurred for PDF files only). So, check if you actually have the font in question on your system (try to find it in editor (such as MS Word - for windows). If you don't have the phont, install it. Google "How to add tryetype font on [your system name: Windows, Linux or whatever you are using]"

Michael Gantman
  • 7,315
  • 2
  • 19
  • 36
  • But wouldn't that be a problem if it gets deployed to production where it's available to everyone but they don't have the font on their system? I thought that having the font exported and placing it where the classpath can see it would remove the need for the users to install the fonts themselves? Was I wrong? – blah Apr 30 '21 at 01:54
  • Also I've already installed the fonts in my OS, still getting the error :\ – blah Apr 30 '21 at 02:49
0

I solved this problem by exporting it as .zip instead of .jar, extracting the contents of the .zip and placing them under classpath.

More details on this in this blog (Solution 3): http://poor-developer.blogspot.com/2017/02/jasper-reports-using-unavailable-fonts.html

blah
  • 101
  • 2
  • 10