aklingel Posted May 12, 2010 Share Posted May 12, 2010 I am trying to ensure that the fonts we use in JasperReports are always embedded so that our customers can send the files to a print company.We have purchased a couple of fonts for this purpose: HelveticaLTCom-Roman and HelveticLTCom-Bold. They are TTF files, and have been added to iReport and also in a jar file with a fonts.xml file.However, when we generate a PDF using either iReport or running a java command, there is ALWAYS an additional font called "Helvetica" in the PDF file.To see if it was my problem, I created a simple report with only one static text field in the file, and ran it. The static text field has HelveticaLTCom-Roman assigned to it.Sure enough, both fonts appear in the PDF file in Acrobat when I do File --> Properties.There are NO undefined fonts in the file. Why is JasperReports doing this? It's maddening!I'm certain there is something I am missing. The Linux server on which this is running has no regular Helvetica font, so I couldn't embed it even if I wanted to. I must get rid of it.I also saved PDF output as a .ps file so that I could read it and sure enough, you can see findfont Helvetica in there. Link to comment Share on other sites More sharing options...
lucianc Posted May 12, 2010 Share Posted May 12, 2010 Which JR version are you using?Regards,Lucian Link to comment Share on other sites More sharing options...
pablodc Posted May 13, 2010 Share Posted May 13, 2010 I have tried this with JR 3.71 - iReport 3.7.1 and the bug/feature exists. Look at attached files. I'dont know if this is related to iText of if is just a JR "behaviour" Grettings from Argentina! Link to comment Share on other sites More sharing options...
lucianc Posted May 17, 2010 Share Posted May 17, 2010 JR creates a PDF anchor to an empty text at the beginning of each exported page. The text uses the default style defined in the report, or default PDF font attributes if there's no default style.Hence adding to the report a default style that uses one of your fonts should fix this. However, there's currently a bug that prevents that from working when font extensions are used. Log a bug for that to get it fixed.So at the moment you can only achieve what you want by using e default style that specifies its own pdfFontName, pdfEncoding and isPdfEmbedded attributes.Regards,Lucian Link to comment Share on other sites More sharing options...
aklingel Posted May 17, 2010 Author Share Posted May 17, 2010 I'm using 3.7.2. Thanks for the information Lucian, I'll file a bug report. Link to comment Share on other sites More sharing options...
mwatkinson Posted July 15, 2011 Share Posted July 15, 2011 My apologies for necroposting, please let me know if I need to create a new thread for this. Has this bug been corrected? I am encountering the same issue and under UNIX or printer is rejecting the PDFs containing my Ireports. I have replaced the default font with Times New Roman, exported to a jar and replaced the default Helvetica by creating a default style using Times New Roman.Helvetica is still appearing in the PDF somehow and as a result I'm left unable to print any generated reports.Details of my Ireports install:Product Version: Jaspersoft iReport Designer 4.0.1Java: 1.6.0_17; Java HotSpot Client VM 14.3-b01System: Windows 7 version 6.1 running on x86; Cp1252; en_US (ireport)Userdir: C:Usersmwatkins.ireport4.0.1 Post Edited by mwatkinson at 07/15/2011 19:10 Link to comment Share on other sites More sharing options...
mreis Posted July 20, 2011 Share Posted July 20, 2011 I've searched the bug tracker for a corresponding bug, but couldn't find one. Is this already fixed in JasperReports and if yes from which version on (I use 3.7.4 and the bug still exists)? Link to comment Share on other sites More sharing options...
mwatkinson Posted July 21, 2011 Share Posted July 21, 2011 Im using 4.0.1 it still is an issue, I do not believe it has been corrected yet, can anyone else confirm? Link to comment Share on other sites More sharing options...
mreis Posted August 5, 2011 Share Posted August 5, 2011 I filed a bug for that - please vote for it -> http://jasperforge.org/plugins/mantis/view.php?id=5368 Link to comment Share on other sites More sharing options...
teodord Posted September 1, 2011 Share Posted September 1, 2011 Hi,This is fixed on SVN and will be part of the next release.As long as you have a default style in the report that uses a font extension, the hidden page anchors will use it and no Helvetica will end up in the resulting PDF.Thanks,Teodor Link to comment Share on other sites More sharing options...
mwatkinson Posted September 22, 2011 Share Posted September 22, 2011 We would up using ghostscript to convert to PCL for printing purposes. Howver its good to hear that the next release will correct this bug. Link to comment Share on other sites More sharing options...
andrey_nado Posted November 12, 2013 Share Posted November 12, 2013 This bug (unwanted Helvetica in PDF) occurs when my default style has conditional font selection. Here is a sample:<style name="def" isPdfEmbedded="true" pdfEncoding="utf-8" isDefault="true"><conditionalStyle><conditionExpression><![CDATA[boolean.TRUE]]></conditionExpression><style fontName="Arial" pdfFontName="Courier" /></conditionalStyle><conditionalStyle><conditionExpression><![CDATA[boolean.FALSE]]></conditionExpression><style fontName="Times" pdfFontName="Times" /></conditionalStyle></style> After PDF report is built I notice "Helvetca" in the font list. 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