Chinese not display in export pdf

Stimulsoft Reports.NET discussion
Post Reply
simon ren
Posts: 67
Joined: Wed Nov 21, 2018 12:51 am

Chinese not display in export pdf

Post by simon ren »

I have Chinese Character in my report and my computer system also has SimSun font.
but when I export my report to pdf. i open the pdf in browser and Adobe reader.
the Chinese Character not display.

here is my report.mrt , report data, my code

report.mrt
printformat.mrt
(11.58 KiB) Downloaded 150 times
report data
printdata.json
(668 Bytes) Downloaded 147 times
my code
mycode.png
mycode.png (29.96 KiB) Viewed 2122 times
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Chinese not display in export pdf

Post by Lech Kulikowski »

Hello,

Please try to add font in the font collection:
Stimulsoft.Base.StiFontCollection.AddFontFile("font.ttf");

Thank you.
simon ren
Posts: 67
Joined: Wed Nov 21, 2018 12:51 am

Re: Chinese not display in export pdf

Post by simon ren »

Lech Kulikowski wrote: Wed Jul 29, 2020 2:52 pm Hello,

Please try to add font in the font collection:
Stimulsoft.Base.StiFontCollection.AddFontFile("font.ttf");

Thank you.
i add this in my code before render report,but it doesn` t work.

Code: Select all

  StiFontCollection.AddFontFile(Path.Combine(Environment.CurrentDirectory, @"..\..\platform\runtime\cloudprint\simsun.ttc"));
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Chinese not display in export pdf

Post by Lech Kulikowski »

Hello,

Please send us sample project that reproduce the issue for analysis.

Thank you.
ulli82
Posts: 47
Joined: Tue Jul 06, 2021 6:46 am

Re: Chinese not display in export pdf

Post by ulli82 »

Hello,

any news about this issue? We have a similar problem. In mixed texts (latin and chinese), the chinese characters are not shown in exported PDF if the font does not support chinese characters. But when I switch Text Render Mode to WYSIWYG, the chinese characters are shown. In Standard Mode, the font substitution is not working.


Regards
Attachments
chinese font.mrt
(5.59 KiB) Downloaded 99 times
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Chinese not display in export pdf

Post by Lech Kulikowski »

Hello,

Most of the standard fonts do not contain national 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" font contains many national characters.

Thank you.
Post Reply