Jump to content
Changes to the Jaspersoft community edition download ×

BUG in Installing new Font in Jaspersoft Studio


haidar_hadi_205

Recommended Posts

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->


  1. True Type : C:tmpARIALN.TTF
  2. PDF Font Name : Left empty as none of the choices has arial narrow
  3. Embed this font in PDF doc : checked. 
  4. 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

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...