Support for Thai upper vowels

Posted by: mik.bialecki on 17 September 2020, 11:49 pm EST

  • Posted 17 September 2020, 11:49 pm EST

    Hello, I'm investigating a bug that we have with generating PDFs with Thai characters.

    I created a simple Section report in AC v14, based an example from [Github][https://github.com/activereports/Samples14/tree/master/API/Section/Export/C%23] and tried to print a simple report with such Thai characters: โพธิ์สุทธิ์

    Here is how it looks in the Visual Studio 2019 editor:


    And how generated document looks like.


    I tried many different fonts, but no luck. This example is generated with Leelawadee UI, which works in Microsoft Word.

    Is there some setting, that I can use to make it generate properly?

    I read this [post][https://www.grapecity.com/forums/documents-pdf/unicode-combining-characte], but couldn't make it work.

    Please help me out.
  • Replied 21 September 2020, 2:38 am EST

    Hello,

    Thank you for sharing the image.
    We too can see the garbled characters with font glyphs. We are investigating further and will get back to you soon with information.
    Also, please report ActiveReports specific cases to the respective forum:
    https://www.grapecity.com/forums/ar-dev

    Regards,
  • Replied 21 September 2020, 11:01 pm EST

    Hello,

    While the team investigates on the issue, can you please try to set the NeverEmbedFonts property to None and see if it workarounds the problem.

    Regards,
  • Replied 21 September 2020, 11:12 pm EST

    After long hours of trying, I was able to export PDF with the correct font glyphs, but I needed to use font Arial Unicode MS, that needs to be installed on the client machine. A better solution would be adding that font to the application and use it as a fallback font during PDF generation, that happens on the server.

    I thied with this setting in Web.config file, but with no luck:

    <sectionGroup name="ActiveReports">
    <section name="ActiveReports8" type="GrapeCity.ActiveReports.Web.ActiveReportsSettingsSection" />
    <section name="FontFactory" type="GrapeCity.ActiveReports.Web.FontFactorySectionHandler, GrapeCity.ActiveReports.Web.v8, Version=8.3.634.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" requirePermission="false" />
    </sectionGroup>

    <ActiveReports>
    <ActiveReports8>
    <WebService reportsFolder="~/" assemblyFolder="~/" />
    </ActiveReports8>
    <FontFactory Mode="File">
    <AddFolder VirtualPath="~/" Recurse="true"/>
    <SetFallbackFont Font="Arial Unicode MS"/>
    <!-- font link nodes -->
    <AddFontLink Font="Arial" List="Arial Unicode MS"/>
    <AddFontLink Font="Arial Unicode MS" List="Leelawadee UI" IsDefault="true" />
    <!-- EUDC link nodes -->
    <DefaultEudcFont File="arial-unicode-ms.ttf"/>
    </FontFactory>
    </ActiveReports>


    I also tried to set up fallback font in code, but it didn't work as well:

    Using pdfExport As New PdfExport
    pdfExport.NeverEmbedFonts = "None"
    pdfExport.FontFallback = "Arial Unicode MS"
    pdfExport.Export(mySessionVars.arReportToPrint.Document, outStream)
    End Using


    Setting NeverEmbedFonts to None didn't help.
  • Replied 23 September 2020, 1:13 am EST

    Hello,

    Please note that AR8 is a legacy product now. It is out of maintenance mode now. Hence, we do not provide support for the same or no bug fixing will be done in the same. I would recommend you use the latest version of ActiveReports i.e ActiveReports 14. Please refer to the following link for more information:
    https://www.grapecity.com/activereports

    Also, "SetFallbackFont" and "AddFontLink" only works with the professional license. If you have the standard license then this will not work.

    I have created a sample "CustomFontFactory" for you using AR14. Could you please check at your end.

    You can download the sample from the following link:
    https://www.dropbox.com/s/vwa9mbyb6j0jprd/CustomFontFactory.zip?dl=0

    You can refer to the following link:
    https://www.grapecity.com/activereports/docs/v14/online/pdf-font-linking-pro-edition.html
    https://www.grapecity.com/activereports/docs/v14/online/pdf-custom-font-factory.html

    Thanks,
    Mohit
Need extra support?

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

Learn More

Forum Channels