tboerkel Posted January 7, 2008 Share Posted January 7, 2008 HI! When using non-styled text, I can have Jasper embedding the configured PDF font of that text box into the document. But how can I do that, when using styled text, where I specify the used PDF font in style tags? Thanks! Thomas Link to comment Share on other sites More sharing options...
lucianc Posted January 7, 2008 Share Posted January 7, 2008 There are styled text attributes that are to used to specify PDF font attributes. See the "styledtext" JasperReports sample for an example. HTH,Lucian Link to comment Share on other sites More sharing options...
tboerkel Posted January 7, 2008 Author Share Posted January 7, 2008 HI! I know, but how to I get Jasper to embed the specified fonts into the PDF? Thomas Link to comment Share on other sites More sharing options...
lucianc Posted January 7, 2008 Share Posted January 7, 2008 Doesn't <style pdfFontName="..." isPdfEmbedded="false">...</style> work? Regards,Lucian Link to comment Share on other sites More sharing options...
tboerkel Posted January 7, 2008 Author Share Posted January 7, 2008 HI! Sorry, my fault! I tried "Wargames" instead of "Wargames.ttf" as font name. It works, when I do NOT set isPdfEmbedded="false", because the default seems to be "true" and that is what is needed. :-) Thanks! Thomas Link to comment Share on other sites More sharing options...
tboerkel Posted January 7, 2008 Author Share Posted January 7, 2008 HI! I have however one additional question about TrueType fonts: There are several TTF fonts installed on Windows (like Arial, etc.). When I use one of these fonts with the fontName attribute, I see the correct font in JRViewer, but not in PDF. To use such already installed TrueType font for PDF, I have to:- find the .ttf file in C:WindowsFonts- copy the .ttf file to the classpath (or iReportfonts)- specify the pdfFontName (the filename) in styled text Example:<style fontName="Freestyle Script" pdfFontName="FREESCPT.TTF">Test</style> Couldn't this be made easier? Jasper should find the correct TTF file for embedding in PDF by only specifying the fontName attribute. Thanks! Thomas Link to comment Share on other sites More sharing options...
lucianc Posted January 8, 2008 Share Posted January 8, 2008 tboerkel wrote:Couldn't this be made easier? Jasper should find the correct TTF file for embedding in PDF by only specifying the fontName attribute. If you have a concrete proposal on how would this work, please post a feature request here. Also check the "fonts" JasperReports sample to see other ways of referring PDF fonts. Regards,Lucian 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