iReport中文和字母的显示问题_微软雅黑 is not available to the jvm
作者:IT小白 | 2024-06-14 04:44:12
赞
踩
微软雅黑 is not available to the jvm
开发环境:Win10、iReport-5.6.0 运行环境:阿里云 Linux 问题:在开发环境下报表显示正常,部署到服务器之后,没有生成PDF文件,检查日志发现下面的错误: - Font '微软雅黑' is not available to the JVM. See the Javadoc for more details. 换成宋体之后同样报错:
- Font '宋体' is not available to the JVM. See the Javadoc for more details.
net.sf.jasperreports.engine.JRRuntimeException: Could not load the following font : pdfFontName : simhei.ttf pdfEncoding : Identity-H isPdfEmbedded : false at net.sf.jasperreports.engine.export.JRPdfExporter.getFont(JRPdfExporter.java:2116) at net.sf.jasperreports.engine.export.JRPdfExporter.getChunk(JRPdfExporter.java:1906) at net.sf.jasperreports.engine.export.JRPdfExporter.getPhrase(JRPdfExporter.java:1875) at net.sf.jasperreports.engine.export.SimplePdfTextRenderer.getPhrase(SimplePdfTextRenderer.java:89) at net.sf.jasperreports.engine.export.SimplePdfTextRenderer.render(SimplePdfTextRenderer.java:99) at net.sf.jasperreports.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:2238) at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:950) at net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:909) at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:786) at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:513) at com.anche.report.Srv_printReport.exportPDFReport(Srv_printReport.java:118) at com.anche.report.service.SrvReport_jczs.createPDF(SrvReport_jczs.java:180) at com.anche.action.ActReportCheck.updateAuthStateByTID(ActReportCheck.java:900) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) .......