JasperReport creates for HTML a folder with CSS and Font

Hi everybody,

since a Java and Jasper update, the "new" HtmlExporter class creates for each html file a folder with a css and font file. I am working with ARIAL.TTF. The fonts.jar was always a part of the project and is in the lib folder.

In the previous version with Java 1.7 and jasperrepors-4.5.0.jar i used the JRHtmlExporter class to generate the file -> this was working fine

 JRHtmlExporter jrHtmlExporter = new JRHtmlExporter();
 jrHtmlExporter.setParameter(JRHtmlExporterParameter.JASPER_PRINT, print);
 jrHtmlExporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, false);
 jrHtmlExporter.setParameter(JRHtmlExporterParameter.OUTPUT_FILE_NAME, filePathAndName);

After the update "jasperreports-5.6.1.jar" - JRHtmlExporter was deprecated

The current code is using the HtmlExporter

HtmlExporter htmlExporter = new HtmlExporter();
htmlExporter.setExporterInput(new SimpleExporterInput(print));
htmlExporter.setExporterOutput(new SimpleHtmlExporterOutput(filePathAndName));

After the change the behavior is different. How can i changed that?

Thx for your help

unvorgiven2's picture
Joined: Oct 10 2017 - 10:19pm
Last seen: 5 years 5 months ago

0 Answers:

No answers yet