samshell Posted February 26, 2010 Share Posted February 26, 2010 Hi everyone!I'm newbie in JasperReports.I have a report that must be generated on IBM zOS (MainFrame) andthen I need to export it to .docx format, then users download it and printin Windows. I'm using SansSerif font in report (because I have very limited numberof fonts on mainframe), everything works fine, but when I open .docx on windows,SansSerif tranformed into Times New Roman, on windows I don't have SansSerif, only MS SansSerif. It's not a problem for me, because I can add this font to JRE on windows,or use another font, but why is this happen ? Link to comment Share on other sites More sharing options...
ginamdar Posted January 26, 2011 Share Posted January 26, 2011 I have exactly same problem..report in RTF comes with Sanserif where as DOCX is all in TimesNewRoman Link to comment Share on other sites More sharing options...
bthale Posted February 3, 2011 Share Posted February 3, 2011 I have the problem too. I saw a post that said that was a bug in 3.5 but it was fixed. I am using 3.7.1 but it's still happening. Link to comment Share on other sites More sharing options...
ginamdar Posted February 5, 2011 Share Posted February 5, 2011 I think what I saw so far is If you are generating RTF report and set the font as SansSerif the output is actually something which is Serif and not "Sans" the reason is if I generate same report in DOCX i get TimesNewRoman. And this font is actually from the family of SansSerif (without strokes @ the end of each character) Also There is no such a font called SansSerif in Windows but you have Microsoft SansSerif, MS Reference SansSerif etc. so 1) Im not sure why the same reports with different output generated with different font2) What if Im generating a report using Jasper on Unix box where I may not have Microsoft Sans Serif ..but If I set the property in JRXML as Microsot SansSerif..what would be the actual output font?Somewhere Im preety much confused. Link to comment Share on other sites More sharing options...
szaharia Posted February 7, 2011 Share Posted February 7, 2011 Here can be found more info about JR fonts and font extensions.SansSerif is a logical font name, so it needs to be translated into real TTF font names during the report export. That depends on how each document viewer application choose to set the appropriate font for the corresponding logical font name.In order to make sure the font remains the same for each output format, you have to export the desired fonts as font extension, and put them in the app's classpath.HTH,sanda Link to comment Share on other sites More sharing options...
ginamdar Posted February 23, 2011 Share Posted February 23, 2011 Thanks for this explaination and the links. Though one question you said its upto viewer how to render a report (or document) so does MS Word behaves differently when my same report is exported in Docx and RTF? Link to comment Share on other sites More sharing options...
franky4 Posted January 19, 2016 Share Posted January 19, 2016 I still have the same problem in JasperStudio v6.2.0 with MS Office 2010 (docx), but not with LibreOffice 4.4.2.2.By the way, I cannot open the created LibreOffice odt with MS Office 2010: The file is corrupt. 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