Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bold doesn't work for a text field...but works for a label

When I format a text field to be displayed in "Bold"..it appears as bold in the ireport output, but is not displayed in bold when the same is viewed as a PDF.. any suggestions...?

like image 319
payal Avatar asked Oct 28 '09 05:10

payal


People also ask

How can you make a text appear bold?

Type the keyboard shortcut: CTRL+B.

How do I bold text in a label in HTML?

To bold the text in HTML, use either the strong tag or the b (bold) tag. Browsers will bold the text inside both of these tags the same, but the strong tag indicates that the text is of particular importance or urgency. You can also bold text with the CSS font-weight property set to “bold.”

What is the HTML way to apply bold styling to text?

To make text bold in HTML, use the <b>… </b> tag or <strong>… </strong> tag. Both the tags have the same functioning, but <strong> tag adds semantic strong importance to the text.

How do you make text bold in C#?

Text = GetMOValue(moDisk, "systemname"); txtType. Text = GetMOValue(moDisk, "MediaType"); txtModel. Text = GetMOValue(moDisk, "Model"); txtFirmware.


2 Answers

Just put this in your pom.xml:

    <dependency>
        <groupId>net.sf.jasperreports</groupId>
        <artifactId>jasperreports-fonts</artifactId>
        <version>5.6.1</version>
    </dependency>
like image 85
user1851885 Avatar answered Oct 09 '22 00:10

user1851885


Just had the same problem... I don't know if it will help you, but...

both the text field and the label have a property called "Pdf font name". You have to set this to a bold font (i.e. "Helvetica-Bold" instead of "Helvetica") to render the field bold in a PDF file.

If you edit the JRXML file directly, this setting is contained in the textelement tag after the "size" and "isBold" properties.

like image 30
Kurt Woloch Avatar answered Oct 09 '22 00:10

Kurt Woloch