OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

jasperreports.engine.util.JRFontNotFoundException: Font "HelveticaNeue-Regular.ttf" is not available to the JVM. See the Javadoc for more details.]

  • Thread starter Thread starter Ch Uzair Ahmad
  • Start date Start date
C

Ch Uzair Ahmad

Guest
Working on springboot application and window os trying to many solution on stackoverflow but not working

met.sf.jasperreports.engine.util.JRFontNotFoundException: Font "Helvetica Neue-Regular.ttf" is not available to the JVM. See the Javadoc for more details. at net.sf.jasperreports.engine.fonts.FontUtil.checkAwtFont(FontUtil.java:581) at net.sf.jasperreports.engine.fill.SimpleText LineWrapper.loadFont (SimpleTextLineWrapper.java:361) at net.sf.jasperreports.engine.fill.SimpleTextLineWrapper.getGeneral Font Info(SimpleTextLineWrapper.java:331) at net.sf.jasperreports.engine.fill.SimpleTextLineWrapper.createFontInfo(SimpleTextLineWrapper.java:271) at net.sf.jasperreports.engine.fill.SimpleTextLineWrapper.start(SimpleTextLineWrapper.java:233) at net.sf.jasperreports.engine.fill.TextMeasurer.measure (TextMeasurer.java:562) at net.sf.jasperreports.engine.fill.JRFillTextElement.chopTextElement(JRF1llTextElement.java:646) at net.sf.jasperreports.engine.fill.JRFillTextField.prepare(JRFillTextField.java:812) at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer. at at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:453) net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:428) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2616) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail (JRVerticalFiller.java:837) net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:276) at at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:119) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:631) at net.sf.jasperreports.engine.fill.BaseReportFiller.fill (BaseReportFiller.java:434) at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:162) at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:145) at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:758) at net.sf.jasperreports.engine.JasperFillManager.fillReport (JasperFillManager.java:1074) at kw.com.cinet.api.client.util.ReportUtil.generateConsent Form (ReportUtil.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) enter image description here

trying differnet methods like add windows fonts and also add jdk fonts but not working

I'm using java 8. I add jasperreports_extension.properties

Code:
net.sf.jasperreports.extension.registry.factory.simple.font.families=net.sf.jasperreports.engine.fonts.SimpleFontExtensionsRegistryFactory
net.sf.jasperreports.extension.simple.font.families=fonts.xml

and fonts.xml


  <?xml version="1.0" encoding="UTF-8"?>
    <fontFamilies>
        <fontFamily name="Helvetica">
            <bold><![CDATA[fonts/Helvetica-Neue-Condensed-Bold.ttf]]></bold>
            <normal><![CDATA[fonts/HelveticaNeue-Regular.ttf]]></normal>
            <pdfEncoding>Identity-H</pdfEncoding>
            <pdfEmbedded>true</pdfEmbedded>
        </fontFamily>
        <fontFamily name="HelveticaNeueArabic">
            <bold><![CDATA[fonts/Helvetica-Neue-Condensed-Bold.ttf]]></bold>
            <normal><![CDATA[fonts/HelveticaNeueLT-Arabic-45-Light.ttf]]></normal>
            <light><![CDATA[fonts/HelveticaNeueLT-Arabic-45-Light.ttf]]></light>
            <pdfEncoding>Identity-H</pdfEncoding>
            <pdfEmbedded><![CDATA[true]]></pdfEmbedded>
        </fontFamily>

</fontFamilies>

also in resource folder add fonts
<p>Working on springboot application and window os trying to many solution on stackoverflow but not working</p>
<p>met.sf.jasperreports.engine.util.JRFontNotFoundException: Font "Helvetica Neue-Regular.ttf" is not available to the JVM.
See the Javadoc for more details.
at net.sf.jasperreports.engine.fonts.FontUtil.checkAwtFont(FontUtil.java:581)
at net.sf.jasperreports.engine.fill.SimpleText LineWrapper.loadFont (SimpleTextLineWrapper.java:361)
at net.sf.jasperreports.engine.fill.SimpleTextLineWrapper.getGeneral Font Info(SimpleTextLineWrapper.java:331)
at net.sf.jasperreports.engine.fill.SimpleTextLineWrapper.createFontInfo(SimpleTextLineWrapper.java:271)
at net.sf.jasperreports.engine.fill.SimpleTextLineWrapper.start(SimpleTextLineWrapper.java:233) at net.sf.jasperreports.engine.fill.TextMeasurer.measure (TextMeasurer.java:562)
at net.sf.jasperreports.engine.fill.JRFillTextElement.chopTextElement(JRF1llTextElement.java:646)
at net.sf.jasperreports.engine.fill.JRFillTextField.prepare(JRFillTextField.java:812)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.
at at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:453) net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:428)
at
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2616)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail (JRVerticalFiller.java:837) net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:276)
at
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:119)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:631)
at net.sf.jasperreports.engine.fill.BaseReportFiller.fill (BaseReportFiller.java:434) at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:162)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:145)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:758)
at net.sf.jasperreports.engine.JasperFillManager.fillReport (JasperFillManager.java:1074) at kw.com.cinet.api.client.util.ReportUtil.generateConsent Form (ReportUtil.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
<a href="https://i.sstatic.net/8ugk3VTK.png" rel="nofollow noreferrer">enter image description here</a></p>
<p>trying differnet methods like add windows fonts and also add jdk fonts but not working</p>
<p>I'm using java 8.
I add jasperreports_extension.properties</p>
<pre><code>net.sf.jasperreports.extension.registry.factory.simple.font.families=net.sf.jasperreports.engine.fonts.SimpleFontExtensionsRegistryFactory
net.sf.jasperreports.extension.simple.font.families=fonts.xml

and fonts.xml


<?xml version="1.0" encoding="UTF-8"?>
<fontFamilies>
<fontFamily name="Helvetica">
<bold><![CDATA[fonts/Helvetica-Neue-Condensed-Bold.ttf]]></bold>
<normal><![CDATA[fonts/HelveticaNeue-Regular.ttf]]></normal>
<pdfEncoding>Identity-H</pdfEncoding>
<pdfEmbedded>true</pdfEmbedded>
</fontFamily>
<fontFamily name="HelveticaNeueArabic">
<bold><![CDATA[fonts/Helvetica-Neue-Condensed-Bold.ttf]]></bold>
<normal><![CDATA[fonts/HelveticaNeueLT-Arabic-45-Light.ttf]]></normal>
<light><![CDATA[fonts/HelveticaNeueLT-Arabic-45-Light.ttf]]></light>
<pdfEncoding>Identity-H</pdfEncoding>
<pdfEmbedded><![CDATA[true]]></pdfEmbedded>
</fontFamily>

</fontFamilies>
</code></pre>
<p>also in resource folder add fonts</p>
Continue reading...
 
Top