PDF Embedded Fonts

I am using JasperServer 0.92 and I am having problems using embedded fonts. I am willing to upgrade to the newest version of JasperIntelligence, but I wanted to make sure that 1) I have the right idea and 2) it works in the new version.

I have:
1) Create a fonts folder (off the root) in the repositor.
2) In the report unit, tried using the font from the fonts folder.
3) In the report unit, tried upload the font directly there.

To try and access the font I have tried in the pdfFontName:
1) repo:arialbd.ttf
2) repo:/arialbd.ttf
3) repo:/fonts/arialbd.ttf
4) repo:fonts/arialdb.ttf

So am I on the right path? Does it work in the version that I have? The new version? Have I missed the boat? ;)

---------XML Example from report-----
<br />
<font fontName="Arial" pdfFontName="repo:arialbd.ttf" size="28" isBold="true" isPdfEmbedded ="true"/><br />
</td></tr></tbody></table><br />
-------------------------------------<br />
Note:<br />
Yes, I know that Helvetica is very close to Arial.  I have other more specialized fonts that I need.   This is just an example.<br />
<br />
Thanks for you help
m2calabr's picture
Joined: Aug 24 2006 - 11:53pm
Last seen: 16 years 9 months ago

3 Answers:

This functionality was implemented after the 1.0.1 release, therefore it will only be available in the next release.

In the meantime, you need to use alternative ways of accessing your fonts, e.g. packing them into a jar placed on your application's classpath and referring to them as class loader resources.

lucianc's picture
Joined: Jul 17 2006 - 1:10am
Last seen: 4 days 7 hours ago
Hi! Can you show example code - how I can referring to font as class loader resources if font placed in jar Thanks
aspiring's picture
Joined: Jun 1 2009 - 2:31am
Last seen: 14 years 6 days ago



The samples that ship with JasperReports are very good. But they don't explicitly help with the configuration for JasperServer. I wrote a little article to help explain how to use fonts in JasperServer. It may help.



mdahlman's picture
Joined: Mar 13 2007 - 2:43am
Last seen: 8 years 6 months ago