Report does not obey formatting when exported to PDF

Asked

Viewed 1,082 times

2

I created a report in iReport that contains formatting (fonts, bold and italics). In the iReport’s own preview it appears correctly, but when used within a Demoiselle-jsf-jpa project and exported to PDF, it does not obey the formatting.

I followed the wiki below the Jaspersoft community, which explains how to use the "font Extensions" feature to solve the problem:
http://community.jaspersoft.com/wiki/bold-and-underlined-fonts-not-rendering-pdf

In short, iReports creates a JAR with the fonts and their variations, which must be placed in the "Classpath". Is this the same as building the path? I tried for Eclipse by adding the JAR to the build path, but it didn’t solve.

Someone has already been through this problem and managed to solve?

Demoiselle-jsf-jpa 2.4.2
Jasperreports and iReport 4.0.1

Fernando

2 answers

2


Man, these times I went through a similar problem, what happened was that the size and sources of the report did not configure in the system, try to look for some . jar with the type of font you will use and put in the report module of your project, updates your list of. ireport or jasperreports jar’s. That’s what solved my problem. Hug! Doubt the question!

  • Thanks, buddy, but it didn’t work. I even downloaded the "standard" Jasper font JAR (http://sourceforge.net/projects/jasperreports/files/archive/jasperreports/JasperReports%204.0.1/jasperreports-fonts-4.0.1.jar/download) and tried to use the "Dejavu Sans" font, which is already pre-configured, but it’s worse.. instead of not showing the formatting, it gives the net.sf.jasperreports.engine.util error.Jrfontnotfoundexception: Font 'Dejavu Sans' is not available to the JVM. I tried to put in the classpath via -classpath parameter, in the CLASSPATH environment variable, in the Buildpath along with the report file, and nothing.

  • Did you put it in the report module of your project? Because Jasper or Ireport will work filet, the problem is that your project does not understand the format you are sending! Try to put the . jar in your project library!

  • That’s right, my friend. When I was generating WAR for the server, the source JAR file was not being included in the lib folder. When I manually included it worked. Thank you.

-3

Galera was having same problem when exporting to PDF I put in my POM the following dependencies: net.sfjasperreports jasperreports 6.16.0 net.sfjasperreports jasperreports-fonts 6.16.0 net.sfjasperreports jasperreports-functions 6.16.0 net.sfjasperreports jasperreports-Metadata 6.16.0 net.sfjasperreports jasperreports-Chart-themes 6.16.0 net.sfjasperreports jasperreports-Chart-customizers 6.16.0

and in some cases did not answer some Tags using the source Arial, more when I switched to Dejavusans font it was all right!!! hope to help someone ^^ !

Browser other questions tagged

You are not signed in. Login or sign up in order to post.