JasperReports: How to add font not in the application classpath
The problem was that the loading of font extensions jars is done from the thread context classloader and from the JRParameter.REPORT_CLASS_LOADER
, nor the JRExporterParameter.CLASS_LOADER
.
Therefore, in my case, the current (initial) thread classloader had to be saved, the we had to do something like Thread.currentThread().setContextClassLoader(cl)
, where cl
was the context of the JasperReports
based application and then the thread context classloader was reverted to the original one.
The question has been answered and details are available here.
I hope this answer will help others facing similar (font) issues.