inditrozen Posted February 7, 2008 Share Posted February 7, 2008 Hi All, I have a requirement to make a few words BOLD from the text element. I have set the flag isStyledText = true and covered that word with <b>. But it does not show me the effect. Any clue? TIA and Regards, Here is the snippet from jrxml file. <staticText> <reportElement x="172" y="15" width="137" height="17" key="staticText-20"> <printWhenExpression><![CDATA[$P{kunden}]]></printWhenExpression> </reportElement> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Center" verticalAlignment="Bottom" isStyledText="true"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[bla bla <b>MAKE ME BOLD</b> bla bla]]></text></staticText>Post edited by: inditrozen, at: 2008/02/07 08:32 Link to comment Share on other sites More sharing options...
inditrozen Posted February 8, 2008 Author Share Posted February 8, 2008 Solution :- if(exporterType.equals(ExporterType.PDF)) { Map fontMap = new HashMap(); fontMap.put(new FontKey("Arial", true, false), new PdfFont("Helvetica-Bold", "Cp1252", false)); fontMap.put(new FontKey("Arial", false, true), new PdfFont("Helvetica-Oblique", "Cp1252", false)); fontMap.put(new FontKey("Arial", true, true), new PdfFont("Helvetica-BoldOblique", "Cp1252", false)); addParameter(JRExporterParameter.FONT_MAP, fontMap); } http://www.rodiq.ro/?p=53 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