Reputation: 199
When using a custom font with Jaspersoft Studio Professional (free version) and jasperserver community edition (free), it must work in three ways:
After searching the questions and answers here on stackoverflow and many other places, I can find how to get some of the three cases working, but not all simultaneously. I'm using jasperserver 6.
Upvotes: 1
Views: 8630
Reputation: 199
Here are the steps to get it working in jaspersoft studio and when exporting PDF. It still only looks correct on the HTML report if the font is installed on the browser's computer.
Now you should be able to select the font in the designer and have it work correctly, even if the font has not been installed to your computer OS directly.
Import the font to jasperserver
edit the fontsfamilynnnnn.xml file to ensure that the <exportFonts>
section is correct:
<exportFonts>
<export key="net.sf.jasperreports.html">Open Sans</export>
<export key="net.sf.jasperreports.xhtml">Open Sans</export>
<export key="net.sf.jasperreports.rtf">Open Sans</export>
</exportFonts>
merge the file jasperreports_extension.properties into that same file which exists in /usr/local/tomcat/webapps/jasperserver/WEB-INF/classes/fonts/
restart the jasperserver
Here are the sources of this information that were most relevant: http://community.jaspersoft.com/wiki/custom-font-font-extension https://mdahlman.wordpress.com/2010/04/16/fonts-in-jasperserver-3-7/
Upvotes: 6