1

I would like to make texts in my Text Field bold by setting isBold = "true" in font element:

        <textField isStretchWithOverflow="true">
            <reportElement x="0" y="0" width="430" height="45" uuid="99b117c7-fc11-4c89-87a0-885432eaae07"/>
            <box>
                <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
            </box>
            <textElement>
                <font fontName="SansSerif" size="24" isBold="true" isItalic="false"/>
            </textElement>
            <textFieldExpression><![CDATA[$P{translations}.get("headline")]]></textFieldExpression>
        </textField>

However the text is not formatted bold when I display it in pdf. I tried find some solutions in the internet and found one solution that setting pdfFontName="Helvetica-Bold". it worked but then I got the warning "The use of pdf font is deprecated and replaced by the font extension"

How can I overcome this warning then?

Ock
  • 1,262
  • 3
  • 18
  • 38

0 Answers0