shamphadtale Posted December 20, 2011 Share Posted December 20, 2011 What should be done if PDF does not support some font. Is there anything by which if font is not supported PDF will use some default font? Link to comment Share on other sites More sharing options...
shamphadtale Posted December 20, 2011 Author Share Posted December 20, 2011 What is the purpose of setPdfFontName() method of JRDesignStyle. Does font set by this method will get used if font used in viewer is not available in iText library? Link to comment Share on other sites More sharing options...
asejas Posted December 22, 2011 Share Posted December 22, 2011 You need to add the not supported font as a jasperreports font extension. See the fonts sample and try to generate your own jasperreports-fonts extension jar with the needed font as ttf embedded. Link to comment Share on other sites More sharing options...
shamphadtale Posted December 23, 2011 Author Share Posted December 23, 2011 Thanks asejas, I am using available fonts on system, I am not providing any font through my application. There could be no. of fonts that can available on different systems. I am giving facility to user for selecting the fonts from available fonts present on system. I need something by which if font is present on system but it is not supportted by PDF and if application user selects that font then while exporting report to PDF some standard font like Arial(which is availabel on all windows machine) should get use. So for this situation I guess creating jasperreport font extention jar will not be the useful solution, since I am not aware about which fonts to be include in font extention. Please correct me if my understanding is incorrect. I am not clear about how to do this, what should be the best way to solve such situation? Regards,ShamPost Edited by shamphadtale at 12/23/2011 09:46 Link to comment Share on other sites More sharing options...
maheshvrk3 Posted January 2, 2012 Share Posted January 2, 2012 Just include Itext.2.1.7 .jar in lib. No need to do anything beyond this. Link to comment Share on other sites More sharing options...
shamphadtale Posted January 2, 2012 Author Share Posted January 2, 2012 I am already using iText-2.1.7.jar. still facing issue. Is anything more I need to do? Link to comment Share on other sites More sharing options...
shamphadtale Posted January 2, 2012 Author Share Posted January 2, 2012 Yes iText uses Helvetica font in exported PDF if font selcetd to generate report is not present. But exported PDF reports does not look well, some text get overlapped with next column or next row. It is due to the formatting(like streching of text fields) are done when report is generated. Exported report has same formatting as of generated report but has different font results in overlapping some text /tools/fckeditor/editor/images/smiley/msn/whatchutalkingabout_smile.gif. Is there any solution for such problem? How should I deal with this problem?Post Edited by shamphadtale at 01/02/2012 09:01 Link to comment Share on other sites More sharing options...
shamphadtale Posted January 2, 2012 Author Share Posted January 2, 2012 I am thinking of recreating report design and save it to PDF with default font Halvetica if user selects to save generated report as PDF. Is there any better option than 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