How to resolve Font " 'MS PGothic' with 'Identity-H' is not recognized " error ?.

0

Hi,

I am using a java application which reads data from a CSV file. The Java application does not uses any beans or framework. It is a core java based application. 

We generate a report template using iReports (4.1.3). The data is then filled into the report template. While doing so I am facing below issue.

Issue Stack Trace: -

net.sf.jasperreports.engine.JRRuntimeException: com.lowagie.text.DocumentException: Font 'MS PGothic' with 'Identity-H' is not recognized.
    at net.sf.jasperreports.engine.export.JRPdfExporter.getFont(JRPdfExporter.java:1906)
    at net.sf.jasperreports.engine.export.JRPdfExporter.getChunk(JRPdfExporter.java:1690)
    at net.sf.jasperreports.engine.export.JRPdfExporter.getPhrase(JRPdfExporter.java:1666)
    at net.sf.jasperreports.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:2099)
    at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:750)
    at net.sf.jasperreports.engine.export.JRPdfExporter.exportFrame(JRPdfExporter.java:2618)
    at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:754)
    at net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:710)
    at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:599)
    at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:381)
    at net.sf.jasperreports.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:122)
    at com.citi.fpu.pdfgenerator.PdfCreator.createPDF(PdfCreator.java:129)
    at com.citi.fpu.destinationwriter.DestinationWriter.generateOutput(DestinationWriter.java:173)
    at com.citi.fpu.processmanager.ProcessManager.processInitializer(ProcessManager.java:94)
    at com.citi.fpu.sourcereader.SourceReader.parseInput(SourceReader.java:256)
    at com.citi.fpu.ftp.FTPStart.execFPUMain(FTPStart.java:554)
    at com.citi.fpu.ftp.FTPStart.main(FTPStart.java:462)
Caused by: com.lowagie.text.DocumentException: Font 'MS PGothic' with 'Identity-H' is not recognized.
    at com.lowagie.text.pdf.BaseFont.createFont(Unknown Source)
    at com.lowagie.text.pdf.BaseFont.createFont(Unknown Source)
    at com.lowagie.text.pdf.BaseFont.createFont(Unknown Source)
    at net.sf.jasperreports.engine.export.JRPdfExporter.getFont(JRPdfExporter.java:1894)
    ... 16 more
 

I have included below jars in the build path of my application: -

1. jasperreports-fonts-4.5.0.jar

2. jasperreports-4.5.0.jar

3. jasper-compiler-jdt.jar

4. itext-asian-5.1.1.jar

5. itextpdf-5.4.3.jar

6. iTextAsianCmaps.jar

Also I created the font extension and included in my build path. I have also ensured that the properties file "jasperreports_extension.properties" has the required entry of font. However the error still persists.

Font Name: - MS PGothic (TTF)

Please help.

rugvedj's picture
Joined: Feb 20 2014 - 2:46am
Last seen: 5 years 8 months ago

0 Answers:

No answers yet
Feedback
randomness