cjs1976 Posted April 22, 2008 Share Posted April 22, 2008 Hi! I must create my reports with iReport. The reports will only be printed on a real printer, or saved as pdf file. For the creation of a pdf file, I have to define an alternate font file. For example ARIAL.TTF. Now I can create a report and show it in JRViewer. If I print this report an a real printer, there is no problem, but if I want to save the report as pdf file, I get an exception, that the ARIAL.TTF file could not be found. I am not allowed to use an other tool as iReport for creating the jrxml files. I am also not allowed to modify the files manually. I can't use FONT_MAP within my Java classes, because I don't know, what fonts the users of the software will use for their reports. Is it possible to set a directory (e.g. C:WINDOWSFonts for Microsoft Windows platforms) outside of my application? Because I don't know, where the font files of the users are. I tried to do this over a jasperreports.properties file, like the demo, but this didn't work. I must use the JRViewer, I can't use the PDF-Export function directly. Any ideas? Thanks,Christian. Link to comment Share on other sites More sharing options...
cjs1976 Posted May 11, 2008 Author Share Posted May 11, 2008 Hi! I am now using the following solution: 1. I have a folder called fonts in the folder of my application. 2. All used fonts must be in this folder. 3. I ship my application as JAR archive, so I have to extend my Class-Path in the Manifest.mf file with the String './fonts/' (without the quotes). This system is ok for me! Annotation: I use eclipse for creating my Java application, so I had to add the fonts folder as additional source folder. Greetings,Christian. 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