add font to JasperServer for export as PDF

Hi all,

I got problems using my own fonts when exporting to PDF. JasperServer always says:

net.sf.jasperreports.engine.JRRuntimeException: Could not load the following font : 
pdfFontName   : Humnst777BtBold.ttf
pdfEncoding   : Cp1250
isPdfEmbedded : false

What steps are necessary to make it work. I already tried to add the font as a resource of the report by using the plugin in iReport and the webservice of JasperServer, without success.

I would appreciate any advice

Stephan

PS: I'm using JasperServer 3.5.0 CE



Post Edited by stephan_r at 07/12/2009 11:39
stephan_r's picture
Joined: Dec 7 2009 - 2:12am
Last seen: 1 year 2 weeks ago

2 Answers:

in the pdf Font Name i'm typing the full path to font :

pdf Font Name: C:\\WINDOWS\\Fonts\\ARIAL.TTF

pdf Encoding: Identity-H (Unicode with horizontal writing)

it's works.

 

maybe you can also modify pdfFontBeans.xml in WEB-INF ..

 

 

malek's picture
74
Joined: Jun 29 2009 - 2:54am
Last seen: 10 years 10 months ago

Hi malek,

thanks for your reply. I tried it your way, with the absolute path and it works

But I try to avoid to work with absolute paths because it makes always trouble and a lot of work if anything changes. I think I found the more comfortable solution. If you add your font to the repository of JasperServer you can use "repo:yourfont.ttf" instead of a separate folder and a absolute path.

Thanks anyway

Stephan

stephan_r's picture
Joined: Dec 7 2009 - 2:12am
Last seen: 1 year 2 weeks ago
Feedback