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...?
Type the keyboard shortcut: CTRL+B.
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.”
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.
Text = GetMOValue(moDisk, "systemname"); txtType. Text = GetMOValue(moDisk, "MediaType"); txtModel. Text = GetMOValue(moDisk, "Model"); txtFirmware.
Just put this in your pom.xml:
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports-fonts</artifactId>
<version>5.6.1</version>
</dependency>
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With