PDF Export with UTF-8 characters

Stimulsoft Reports.WEB discussion
Post Reply
n.froeh
Posts: 17
Joined: Mon Oct 05, 2020 6:03 am

PDF Export with UTF-8 characters

Post by n.froeh »

Hello,

we have a problem with the pdf export with special UTF-8 characters.
We have some string fields in our JSON-DataSource, which could contain all kinds of UTF-8 characters. We try to display those fields by text or HTML-text components (font: Arial which is installed by ttf-mscorefonts-installer on the linux machine).
These characters are displayed correctly in the designer, although some characters get missing when we export the report to pdf (see attached example report).

Designer:
charactersRight.PNG
charactersRight.PNG (2.46 KiB) Viewed 2590 times
Exported PDF:
charactersWrong.PNG
charactersWrong.PNG (5.95 KiB) Viewed 2589 times
I found some posts in this forum, that some fonts do not contain all UTF-8 characters and that's why some characters are missing in the exported report, too.

Is this right and what is the best way to ensure that all utf-8 characters are displayed correctly in the exported pdf?

Thank you for your time.
Best Regards.
Attachments
UTF8Report.mrt
(5.88 KiB) Downloaded 161 times
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: PDF Export with UTF-8 characters

Post by Lech Kulikowski »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
n.froeh
Posts: 17
Joined: Mon Oct 05, 2020 6:03 am

Re: PDF Export with UTF-8 characters

Post by n.froeh »

Hello,

is there an update on this?

Thank you.
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: PDF Export with UTF-8 characters

Post by Lech Kulikowski »

Hello,

We are still working on the issue, we will let you know about the result.

Thank you.
#3777
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: PDF Export with UTF-8 characters

Post by Lech Kulikowski »

Hello,

Most of the standard fonts do not contain all national and special characters.
In this case, Windows uses the "font fallback". This algorithm is very complicated and, therefore, is not realized in the exports.
To output national characters, please, use the font which contains all necessary characters.
For example, the "Arial Unicode MS" and "Lucida Sans Unicode" fonts contain many national characters.

But in your case, your sample has a lot of specific characters that are rarely found in the same font.
We recently made a modification, now if TextQuality=Wysiwyg, the algorithm tries to pick up characters from other fonts. It uses the peculiarity of the RichText component, so the algorithm only works in Net-Engine on Windows.

In your case, the algorithm uses three fonts at once to display all characters on our test computer:
Arial, MV Boli, Ebrima.

Thank you.
Post Reply