Pdf export failed for custom font

0

Hi.

I have prepared a custom font jar and add the jar in /jasperreports-server-cp-6.2.1/apache-tomcat/webapps/jasperserver/WEB-INF/lib directory.

In my jrxml i Used these code for pdf

<property name="net.sf.jasperreports.default.pdf.encoding" value="Identity-H"/>
<property name="net.sf.jasperreports.default.pdf.font.name" value="Malgun Gothic"/>
 
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Malgun Gothic" size="10" pdfFontName="Malgun Gothic" pdfEncoding="Identity-H"/>
</textElement>

When I try to export as pdf I get the following error

{"message":"Could not load the following font: \npdfFontName: Malgun\npdfEncoding: Identity-H\nisPdfEmbedded : true","errorCode":"export.execution.rejected"}

I do not know what I am missing ?

Any help would be highly appreciated.

abdullah.mamun's picture
Joined: Aug 4 2016 - 11:02pm
Last seen: 3 years 1 week ago

How to use custom font in jrxml then ?

abdullah.mamun - 3 years 2 weeks ago

3 Answers:

0

pdf properties are obsolete. Don't use them. Use custom fonts like any other fonts - there's no need to specify a pdf font.

hozawa's picture
57650
Joined: Apr 24 2010 - 4:31pm
Last seen: 8 months 1 week ago
0

How to use custom font in jrxml then ?

abdullah.mamun's picture
Joined: Aug 4 2016 - 11:02pm
Last seen: 3 years 1 week ago
0

Just specify your custom font name in font. Your custom font will be used in pdf export too.

http://community.jaspersoft.com/wiki/custom-font-font-extension

hozawa's picture
57650
Joined: Apr 24 2010 - 4:31pm
Last seen: 8 months 1 week ago
Feedback