Jump to content
Changes to the Jaspersoft community edition download ×

font (ttf) file location problem

2004 IR Help

Recommended Posts

By: Rivka Shisman - rivka_shisman

font (ttf) file location problem

2005-12-11 05:22

hi all,


i create reports in pdf format.

i use "david.ttf" for my pdfFontName.


my font is found by jasper reports only when i write pdfFontName="c:\windows\fonts\davis.ttf" in the jrxml file itself.


in any other way it gives me the JRException:

"Could not load the following font :

pdfFontName : "david.ttf"

pdfEncoding : "Identity-H" isPdfEmbedded : "false"


from the JRPdfExporter class.


adding jasperreports.properties file with a line for the fontdir - didn't help!


can you please recommend me a more flexible way for telling jasper reports where's the font directory?


thanks a lot






By: C-Box - c-box

RE: font (ttf) file location problem

2005-12-11 23:28

Just create a JAR Archiv and put your font(s) inside and put that jar in your Java-Classpath... or if it's just on that one machine you mentioned... add the directory "C:\WindowsFonts\" to your java-classpath. (or just the single ttf-file)


I do have some similiar problems but on a more complex environment - see here (also for Teodor comments and latest changes related to this topic):










By: Rivka Shisman - rivka_shisman

RE: font (ttf) file location problem

2005-12-12 02:38

hi c-box


i am working with the IBM Websphere application server.


as much as i know, adding a jar to my web project classpath is done by copying the jar to the "lib" directory of my project.


i copied the ttf file to the lib dir - didn't work

and also to the "classes" dir - didn't work either.


so, what do you mean by adding it to the claspath?

did i do something wrong?


thanks a lot


Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...