haidar_hadi_205 Posted May 31, 2014 Share Posted May 31, 2014 update: even when I import a jar file genereated by the iReport it does not work. I think this is a bug with the Jasper Studio. update: attached is my jar file. I am trying to install a new font in Jasper Studio (Arrial Narow) so that I can eventually print the report as a PDF docuemtn. Here are my steps: Project Properties ->Fonts --> Configure Workspace settings ->Add-> True Type : C:tmpARIALN.TTF PDF Font Name : Left empty as none of the choices has arial narrow Embed this font in PDF doc : checked. Everything else is default Then applied my new font to a lable on my report and I keep getting this error: java.lang.reflect.InvocationTargetException at com.jaspersoft.studio.editor.preview.actions.export.AbstractExportAction$1.run(AbstractExportAction.java:122) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: net.sf.jasperreports.engine.JRRuntimeException: com.lowagie.text.DocumentException: Font '' with 'Cp1252' is not recognized. at net.sf.jasperreports.engine.export.JRPdfExporter.getFont(JRPdfExporter.java:2062) at net.sf.jasperreports.engine.export.JRPdfExporter.getChunk(JRPdfExporter.java:1818) at net.sf.jasperreports.engine.export.JRPdfExporter.getPhrase(JRPdfExporter.java:1787) at net.sf.jasperreports.engine.export.SimplePdfTextRenderer.getPhrase(SimplePdfTextRenderer.java:89) at net.sf.jasperreports.engine.export.SimplePdfTextRenderer.render(SimplePdfTextRenderer.java:100) at net.sf.jasperreports.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:2158) at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:861) at net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:821) at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:698) at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:420) at com.jaspersoft.studio.editor.preview.actions.export.AbstractExportAction.exportWithProgress(AbstractExportAction.java:219) at com.jaspersoft.studio.editor.preview.actions.export.AbstractExportAction$1.run(AbstractExportAction.java:119) ... 1 more Caused by: com.lowagie.text.DocumentException: Font '' with 'Cp1252' 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:2051) ... 12 more Link to comment Share on other sites More sharing options...
haidar_hadi_205 Posted June 3, 2014 Author Share Posted June 3, 2014 any idea from the Jasper staff? Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted June 4, 2014 Share Posted June 4, 2014 Hi Haidar, the Font extension you are using seems to work well, I was able to produce a report and export it to PDF without problems. May we see your jrxml? Thanks Giulio Link to comment Share on other sites More sharing options...
Massimo Rabbi Posted June 4, 2014 Share Posted June 4, 2014 I was able to use the font inside the jar file you attached. Haidar could you please open bug on the tracker? http://community.jaspersoft.com/bug-tracker?field_bug_project_target_id=496 Please remember to attach if possible the JRXML and also the version information about the JSS you are using. Thanks in advance. Regards, Massimo. Link to comment Share on other sites More sharing options...
haidar_hadi_205 Posted June 4, 2014 Author Share Posted June 4, 2014 when you generate a PDF file does the font show in Arial Narrow ? Link to comment Share on other sites More sharing options...
hozawa Posted June 4, 2014 Share Posted June 4, 2014 There was a bug in 5.5.0 release with external fonts. Try using the most recent version 5.6.0. Link to comment Share on other sites More sharing options...
haidar_hadi_205 Posted June 5, 2014 Author Share Posted June 5, 2014 Thank you so much for answering this, where can I download 5.6.0 from? On the download page for the professional version there is only 5.5.0. Any idea? Link to comment Share on other sites More sharing options...
haidar_hadi_205 Posted June 5, 2014 Author Share Posted June 5, 2014 Also , are you using 5.5 Jaspersoft Studio Professional ? Link to comment Share on other sites More sharing options...
hozawa Posted June 10, 2014 Share Posted June 10, 2014 If you have access to Jaspersoft Support portal, the recent download should be 5.6.0. I'm not sure if 5.5.0a that is available at sourceforge fixes this problem or not. 5.6.0 release notes: defect 35513 JasperReports Server 5.5 is unable to work with font extension file which contains CDATA tags Defect 35665 Font Extensions do not work in JasperReports Server 5.5/HTML output Link to comment Share on other sites More sharing options...
smakaiser Posted June 14, 2014 Share Posted June 14, 2014 I have exporters to pdf, xls, and xlsx. I had this issue with pdf under 5.5.0 and the upgrade to 5.6.0 fixed the issue with the pdf font extensions. However, I am now having a simliar problem getting the font extensions to work using xlsx. It worked fine with 5.5.0 but is now broken with 5.6.0. Both versions export the fonts to xls correctly. Has anyone else reported this? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now