Reputation: 133
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
Upvotes: 3
Views: 1396
Reputation: 19
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);
Upvotes: 1