cjs1976 Posted April 24, 2012 Share Posted April 24, 2012 Hi!I have the following problem: If I design my reports with iReport 4.5.1, and if I test them, and if I save the test as PDF, everything works fine.If I use the report directly from my Java application over JasperReports, the view is ok, but if I save it as PDF, all formatting (bold and so on) is lost.I found some hints, that this problem comes from the fonts, because they are not available in the classpath. I found also a hint, that the use of TTF files over the classpath is deprecated. It should be better to install the fonts in iReport, and than create one or more JAR files over the iReport font exporter.Okay. I installed the fonts, and there where no errors. I can see (and modify) the fonts in the options dialog. I created single JAR files of every font. This also worked fine.BUT: If I try to select this fonts for a text field under iReport, the font isn't in the list!!!If I add one of my JARs (from iReport Font exporter) to the iReport classpath, I can choose it under 'Font name'. And if I add the JAR to the classpath of my Java application, also my PDF file is okay.IS THIS THE SYSTEM WHICH SHOULD I USE???An other problem is, that some fonts kill iReport (Helvetica, MS Reference Sans Serif...). This means, after adding them to the iReport classpath, I can't open any reports. Everything is empty, only a grey background.Are there any hints/tips you can give me???Thanks,Christian. Link to comment Share on other sites More sharing options...
ankur_bulan Posted April 26, 2012 Share Posted April 26, 2012 Hi,Is your report generate correctly while compiling it from ireport tool??From which OS u are calling the report from your java code ?? Link to comment Share on other sites More sharing options...
cjs1976 Posted April 27, 2012 Author Share Posted April 27, 2012 Yes, iReport works perfect.I use Windows 7 64-Bit.I built a JAR with the free fonts of RedHat (see https://fedorahosted.org/liberation-fonts), and used them to create my reports. I placed the JAR in the LIBS folder of my application, and added it to the classpath.To use them, I had to add the JAR also to the iReport classpath.Now it works!Is this the right way? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now