Jump to content
We've recently updated our Privacy Statement, available here ×

Change font size of displayed data


dknutson

Recommended Posts

I'm running jasperserver 3.7 and have created reports using iReports 3.6.  The reports are formated so they print well in PDF format.  Problem is, when I run the report from the server, the page initially loads as html and the font size is so small as to be unreadable.

What do I need to do to address this problem?  Is there a setting somewhere that will control the page and is this in jasperserver or in iReports?

Thanks!

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

The problem is likely this: you have specified a font in the report (perhaps unintentionally) that the server doesn't have access to. The JVM swaps in some other font to be able to render the report. But it's ugly.

You could confirm my guess by setting this value to false in WEB-INF / classes / jasperreports.properties
# ignore missing fonts in reports
net.sf.jasperreports.awt.ignore.missing.font=true

Restart the server. See if your report now fails to run at all. If it fails... that's great! You have identified the problem. You should then be able to update the reports to use more appropriate fonts, or conversely you might want to leave the report unchanged but make sure the server has access to the required font.

Regards,
Matt

Link to comment
Share on other sites

Hi,

 

It was a know problem that the same text with the same font size appears to be smaller in HTML. This is because by default, in the JR HTML exporter, we specify font size in pixels.

If we configure the HTML exporter to specify font size in points, using the JRHtmlExporterParameter.SIZE_UNIT, then the trouble is that images cannot be sized in points and we end up with a discrepancy between pixel-based measurements (images) and point-based measurements (text).

 

This is why we recently enhanced the HTML and the XHTML exporters in JR to make use of the ZOOM_RATIO exporter parameter, that was previously known by the AWT exporter only.

This way we could export a document in pixels, so that everything stays consistent, but at a specified zoom ratio, so that text appears to remain the same size in the browser, compared to 100% zoom in PDF or the other formats.

http://jasperforge.org/projects/jasperreports/tracker/view.php?id=4483

 

This new exporter parameter will be available in JR 3.7.1. Unfortunately, this came in too late for inclusion in JS 3.7, soon to be released, but you could make JR upgrades in your local JS deployment if you want to make use of this.

 

I hope this helps.

Teodor

 

Link to comment
Share on other sites

  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...