开发者

JasperReports html export

开发者 https://www.devze.com 2023-04-05 00:18 出处:网络
I have developed a report in JasperReports, it appears fine when exported as PDF, but when I export same report as HTML it appears smaller in size. Does anyone have any idea, how is it possible to set

I have developed a report in JasperReports, it appears fine when exported as PDF, but when I export same report as HTML it appears smaller in size. Does anyone have any idea, how is it possible to set the parameters so that it displays properly in PDF & HTML. Also is it开发者_运维百科 possible to specify the pageWidth height etc. as percentages


Look at the source of html, you may find the font unit is px, however PDF is using the font unit pt, that's why the html font is smaller than pdf. So you may need the following code to set the html font unit to pt.

 exporter.setParameter(JRHtmlExporterParameter.SIZE_UNIT, JRHtmlExporterParameter.SIZE_UNIT_POINT);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号