我正在使用jasperreport和PHP。我在安裝新字體時遇到了問題,我使用以下步驟在jasper報告中安裝了新字體。如何在jasperreports中安裝新字體
編輯
jasperreports_extension.properties
加入以下行
net.sf.jasperreports.extension.simple.font.families.Mistral =淨/ SF/JasperReports的/字體/字體。 XML
-
在
- 添加以下線
net\sf\jasperreports\fonts\fonts.xml
我收到以下錯誤
Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed: [[c:JasperExportManager]]->exportReportToPdfFile((o:JasperPrint)[o:JasperPrint], (o:String)[o:String]). Cause: net.sf.jasperreports.engine.JRRuntimeException: Could not load the following font : pdfFontName : Mistral pdfEncoding : Cp1252 isPdfEmbedded : false VM: [email protected]://java.sun.com/" at: #-18 net.sf.jasperreports.engine.export.JRPdfExporter.getFont(JRPdfExporter.java:1961) #-17 net.sf.jasperreports.engine.export.JRPdfExporter.getChunk(JRPdfExporter.java:1725) #-16 net.sf.jasperreports.engine.export.JRPdfExporter.getPhrase(JRPdfExporter.java:1694) #0 /mount1/imeddoc/dev/JasperReports/includes/javabridge.php(338): java_ThrowExceptionProxyFactory->getProxy(12, '@V', 'Could not load ...', true) #1 /mount1/imeddoc/dev/JasperReports/includes/javabridge.php(495): java_Arg->getResult(true) #2 /mount1/imeddoc/dev/JasperReports/includes/javabridge.php(501): java_Client->getWrappedResult(true) #3 /mount1/imeddoc/dev/JasperReports/includes/javabridge.php(705) in /mount1/imeddoc/dev/JasperReports/includes/javabridge.php on line 301
誰能幫我解決這個問題,請
當使用jasperreports創建報告時,它依靠服務器操作系統來查找資源,如字體。檢查報告構建的服務器是否有可用的字體。 – Alfabravo 2013-02-12 14:52:00