Cannot output PDF with Chinese characters using Google Noto fonts.

Posted by: g.caine on 16 November 2017, 5:50 pm EST

  • Posted 16 November 2017, 5:50 pm EST

    We are trying to rep[lace our use of Arial Unicode MS with Google Noto fonts.

    In particular when trying to use a Chinese font I get the following error in the windows event viewer when trying to generate the PDF

    The VB Application identified by the event source logged this Application SessionManager: Thread ID: 7444 ,Logged: GTIReports Error: Visual Basic Error Number: -2147467259 Description: ActiveReports PDF export DLL error
    Error 212:Couldn't export PDF using font 'Noto Sans CJK SC Thin' because characters referencing this font could not be represented with the character encoding 'WinAnsiEncoding.'


    Here is a subseet of the code


    Public Const REPORT_FONT = "Not Sans CJK SC Thin" '"Arial Unicode MS"
    ...
    If ReportFormatType = enmPDF Then
    Set objPDFExport = New ActiveReportsPDFExport.ARExportPDF

    objPDFExport.AcrobatVersion = DDACR40
    objPDFExport.SemiDelimitedNeverEmbedFonts = ""

    objPDFExport.ExportStream objReport.Pages, objOutputStream





    Interestingly if I set objPDFExport.SemiDelimitedNeverEmbedFonts = REPORT_FONT then it works but the Chinese characters appear as boxes.

    Is it possible to use other fonts other than Arial Unicode MS? Why does Arial Unicode MS not have the same issue?

    Thanks,

    Greg
  • Replied 20 November 2017, 12:13 am EST

    We had issues with rendering using Noto fonts and viewing in Adobe reader... With Foxit reader, it worked well always. Suggestion from support for our issue was to use NOTO TTF instead of NOTO OTF and it worked...Maybe, this suggestion could help in your case
  • Replied 20 November 2017, 12:13 am EST

    We had issues with rendering using Noto fonts and viewing in Adobe reader... With Foxit reader, it worked well always. Suggestion from support for our issue was to use NOTO TTF instead of NOTO OTF and it worked...Maybe, this suggestion could help in your case
  • Replied 20 November 2017, 11:12 am EST

    Firstly thanks for your suggestion but the Chinese character set (and other Asian languages) appear to only have .otf extensions in the NOTO font library. I'm trying to use the font file NotoSansCJKtc-Thin.otf.

    We were able to use an English version of the NOTO fonts (which are .ttf files) but need to support multiple languages.
  • Replied 21 November 2017, 2:22 am EST

    Hello,

    I would like to inform you that we only support ttf fonts and not .otf fonts. As suggested you may use the NOTO ttf fonts instead.

    Thanks.
    Deepak Sharma
  • Replied 21 February 2019, 8:50 pm EST

    Hello,

    I am facing the same problem. I must use chinese characters in my app and export it to pdf, and since i cannot use Arial Unicode (licensed) I was trying to use NotoGoogleCJK but is otf. Are you planning to support otf?

  • Marked as Answer

    Replied 21 February 2019, 10:32 pm EST

    Hello,

    AR uses GDI+ to render the Report and OpenType fonts are not supported by GDI+. Hence, AR does not support OTF Font. However, I have escalated the issue to our development team(ID 168510) to include the support of OTF font in AR future releases. Will Inform you once I get any information from them.

    Thanks.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels