0

I use label to set Chinese and use bold to make the character bold,it has effect in ireport software,but there is no effect when I print it in pdf.

<staticText>
            <reportElement uuid="20445ac6-99f7-44aa-9e7f-f9b658decf3b" x="0" y="0" width="554" height="23"/>
            <textElement textAlignment="Center" verticalAlignment="Middle">
                <font fontName="SansSerif" size="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
            </textElement>
            <text><![CDATA[学生预防性体检结果]]></text>
        </staticText>
Alex K
  • 22,315
  • 19
  • 108
  • 236
  • Did you try to use [Font Extensions](http://jasperreports.sourceforge.net/sample.reference/fonts/index.html#fontextensions)? – Alex K Nov 23 '16 at 12:39
  • 2
    Possible duplicate of [Jasper Reports PDF doesn't export cyrillic values](http://stackoverflow.com/questions/34041619/jasper-reports-pdf-doesnt-export-cyrillic-values) & [How can I render hindi correctly when exporting to pdf?](http://stackoverflow.com/q/34287186/876298) – Alex K Nov 23 '16 at 12:40
  • Check the SO docs on [font-extensions](http://stackoverflow.com/documentation/jasper-reports/5773/font-extensions) – Petter Friberg Nov 23 '16 at 13:47

1 Answers1

0

I select microsoft yahei fonts as my Chinese font , simsun font as my text field fonts ,put wryh.jar under the libs of project and the fonts can be seen bold when i printview it in pdf .My problem is solved.thanks everyone