net.sf.jasperreports.engine.util.JRFontNotFoundException: Font ‘xx’ is not ...

net.sf.jasperreports.engine.util.JRFontNotFoundException: Font ‘xx’ is not available to the JVM. 

 

This is because there is no corresponding font, because some default.jasperreports.properties file in japserperreport.jar

net.sf.jasperreports.awt.ignore.missing.font=false

An exception will occur if the font does not exist.

 

Simple solution: add a jasperreports.properties file to the classpath, add a line

net.sf.jasperreports.awt.ignore.missing.font=true

 

Recompile.

 

Or modify the contents of the properties file in jasperreport.jar and repackage it.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327070041&siteId=291194637