Jump to content
We've recently updated our Privacy Statement, available here ×
  • Some Thai Characters Are Not Displaying Properly in PDF export


    asimkin
    • Features: Exporters Version: v6.4 Product: JasperReports® Library

    Issue Description

    Customer created a font extension to use AngsanaUPC font to work with Thai lang text.

    They identified that some characters are not displayed properly in PDF output while in MS Excel, Word export everything looks good:

    thaiexports.png.1319e9fae3dc5f5bb5ced3589a17a0bf.png


    Resolution

    In order to fix the issue, a property should be added to the report:

    net.sf.jasperreports.export.pdf.glyph.renderer.blocks.x

        <property name="net.sf.jasperreports.export.pdf.glyph.renderer.blocks.x" value="thai"/>

    This bypasses iText's text layout by using Java/AWT to render the text in PDF.

    After the property applied, generated PDF contains correct charactrers:

    thaicorrectpdf.png.c78713f70dc5c2df40d4c09bc699dcac.png

    The property value is Unicode block name, case is ignored:

    https://en.wikipedia.org/wiki/Unicode_block


    Ref. Case 01519705

    thaiexports.png.2091b03277539a8d5685a55a41bd7008.png


    User Feedback

    Recommended Comments



    Guest
    This is now closed for further comments

×
×
  • Create New...