acostache Posted September 16, 2009 Share Posted September 16, 2009 Hi,I am sorry if I am asking an already answered question - if that's the case please redirect me (this is my first post here).I am trying to export to PDF a (jrxml) report (created using iReport 3.6.0) with JasperReports 3.6.0. The font is embedded (i need to use an embedded font) and i have added it to the JVM classpath, but i get an error (could not load font...). I have also tried to use the "extension" method i read on about in a different thread (as in the font sample with an xml, font and properties file all in a jar file). The result is still negative. I have attached the report. I would be grateful for any help (including redirection to other threads/documentation). Regards,Andrei Link to comment Share on other sites More sharing options...
venture Posted September 28, 2009 Share Posted September 28, 2009 Andrei,Any response?Did you bundle two files according to the sample in the latest 3.6.0 demo/fonts folder into a jar and have the jar file on the classpath of the "application executing the jasperreport"?Can you upload the jar file or the two files (properties and the xml) to review? You can also answer on the other forum... Link to comment Share on other sites More sharing options...
teodord Posted September 29, 2009 Share Posted September 29, 2009 Hi, Andrei Can you post the exception here? We need to see which font is complaining about.I see that you have also tried to embed Courier, which is a PDF built-in font that normally does not need to be embedded. Thank you,Teodor Link to comment Share on other sites More sharing options...
acostache Posted July 2, 2010 Author Share Posted July 2, 2010 Hi, Teodor, Sorry for reopening this after such a long time.At the time I was writting, I was able to somehow fix this by placing the desired font, in a separate folder, which I was able to "feed" to the PDF exporter, via pdfExporter.setParameter(JRExporterParameter.FILE_RESOLVER, new SimpleFileResolver(list_of_directories)), where "list_of_directories" contains a list of folders where I have the fonts in.However, we have upgraded our application to JasperReports 3.7.1 and this does not work anymore. Therefore, I have used font extensions and a couple of parameters (like REPORT_CLASS_LOADER) through which I tried to make jasper "see" my fonts.More about this is in a post I wrote yesterday: http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=76180.I am attaching a small Java application and the corresponding Jasper report (jrxml file). Even through all methods commented in the .java file, the exporter does not render the desired font (called "Corbel"). I am also attaching the Corbel font extension, exported via iReport 3.7.1.Please note that I am not getting any error message just that the PDF is not rendered as it should. By adding the font extension jar to the iReport classpath, the report is rendered ok. Again sorry for not posting my temporary solution at that time and for reopening this after such a long time, but this becoming quite an issue for me and I am not sure what I have missed out regarding fonts, fonts extensions and PDF exporting. Best regards,AndreiPost Edited by andreicostache at 07/02/2010 09:06 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