Search code examples
jasper-reports

Font Styles Bold,italic not working in pdf while using ireport


I am using irport 3.1.0, while generating preview from the ireport all styles(bold,italic) are working, but while invoking from web application everything coming as plain text.

i have tried with below properties in font

<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isPdfEmbedded="true"/>

can anyone suggest me what are the necessary steps to take care while generating pdf using ireport.

Thanks,


Solution

  • Finally, I did some fix for this:

    <font fontName="SansSerif" size="9" isBold="true" isItalic="false" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
    

    By using pdfFontName="Helvetica-Bold", I am able to see the fonts as bold and for italic, I have used:

    <font size="8" isBold="false" isItalic="true" pdfFontName="Helvetica-Oblique" isPdfEmbedded="true"/>