imanol00 Posted October 30, 2006 Share Posted October 30, 2006 Hello everybody! I have been reading a lot about this question in several forums, but I haven't found a solution yet. I think that what I want to do is very simple: I want to use an external True Type Font in my reports. I´m developing a desktop aplication in Java, using Eclipse for Windows, JasperReports 1.2.7 and iReport 1.2.7. I have tried lots of things, all in vain: putting the %WINDOWS%fonts folder into the CLASSPATH variable, copying my own fonts into the "fonts" folder of iReport (and restart iReport), PDF embedding, not embedding...and so on, with no result. The only result I got is... the following Exception!! : net.sf.jasperreports.engine.JRException: Could not load the following font :pdfFontName : MyFont.TTFpdfEncoding : CP1252isPdfEmbedded : false at net.sf.jasperreports.engine.export.JRPdfExporter.getChunk(JRPdfExporter.java:1390)......... Can somebody help me? Thanks a lot, JasperUsers!!Post edited by: imanol00, at: 2006/10/30 15:11 Link to comment Share on other sites More sharing options...
Teodor Danciu Posted November 1, 2006 Share Posted November 1, 2006 Hi, Have you checked the supplied /demo/samples/fonts sample provided with the project?I'm sure there must be a file location or classpath problem.Try to start from one example that works and adapt it to your context. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
imanol00 Posted November 1, 2006 Author Share Posted November 1, 2006 Thanks teodord!! I finally solved my problem, but not the way I would liked (a typical situation in a programmer's life...hehe). At the end I realized that the field "PDF Font" referred to the name of the file containing the font itself. As I said, I tried all the things I read in the posts of this forum, with no result. The only thing that worked was so simple that I almost cried when I did it... I put the font file in the working directory of my project... so ugly, so efficient! But I have a new question... does anybody know how to modify the ".classpath" file created by Eclipse to be able to use external fonts from another folder?? Or any idea like that?? Thans a lot!!Post edited by: imanol00, at: 2006/11/01 14:46 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