Jump to content

Use custom fonts when creating PDF in Jasper Report


michael.kim

Recommended Posts

Please somebody help me about font problem of Jasper Report.

I tried to use custom font(**DejaVu Sans Condensed**) when creating PDF in Jasper Report. But I got error from it.

 

** Error Description **

java.lang.Exception: net.sf.jasperreports.engine.JRRuntimeException: Could not load the following font : 

pdfFontName   : DejaVu Sans Condensed

pdfEncoding   : Identity-H

isPdfEmbedded : false


 

- Developing Environment

OS:MacOS

Tool:Jaspersoft Studio 5.6.1.final

- Server Envrionment

OS:Linux Ubuntu 14.04.1


 

I used **.jrxml** file for source code.

Here is my source code.

 

<property name="net.sf.jasperreports.awt.ignore.missing.font" value="true"/>    <property name="net.sf.jasperreports.default.font.name" value="DejaVu Sans Condensed"/>    <property name="net.sf.jasperreports.default.pdf.font.name" value="DejaVu Sans Condensed"/>    <property name="net.sf.jasperreports.default.pdf.encoding" value="Identity-H"/>    <property name="net.sf.jasperreports.default.pdf.embedded" value="false"/>        <font fontName="DejaVu Sans Condensed" size="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="DejaVu Sans Condensed" pdfEncoding="Identity-H" isPdfEmbedded="false"/>[/code]
    

 

Even I set 'isPdfEmbedded=true', but same error.

There is no any Maven, Gradle. Only use **.jxrml** file

These are what I referred.

 





 

 

P.S. My english is not good. So if you can't understand my question then please ask me again. Thanks.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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...