Closed doerler closed 1 year ago
I've found the problem - the Arial fonts (which are used in RenderPdf_iTextSharp.cs) don't support Japanese or Chinese characters.
My changes in RdlEngine/Render/RenderPdf_iTextSharp.cs: I've added this function
public bool IsAsian(string[] text)
{
bool asian = false;
for (var i = 0; i < text.Length; ++i)
{
asian |= text[i].Any(c => c >= 0x4e00);
if (asian)
{
break;
}
}
return asian;
}
and changed the function AddText (line 374):
else if (face == "Arial")
{
if (IsAsian(sa))
{
face = "Arial Unicode MS";
fontname = "arialuni.ttf";
}
else if (si.IsFontBold() && si.FontStyle == FontStyleEnum.Italic)
Not the most elegant way to solve this problem, but maybe it helps somebody else.
Open a pull request and I'll merge in the changes.
Created pull request: https://github.com/majorsilence/My-FyiReporting/pull/153
the pull request was missing two Japanese scripts. Opened a new pull request: https://github.com/majorsilence/My-FyiReporting/pull/154
great. thanks.
My fix allows the use of other CJK fonts, I think this can be closed.
Is it possible to generate PDF reports with Japanese and Chinese Charakters. They look fine in the designer, but the generated reports are not showing them. The old PDF Output method doesn't show the right characters.
Is this just a report issue (correct font) or is there a bigger problem with My-FyiReporting supporting chinese and japanese reports ?