Posted 23 May 2022, 3:26 pm EST
I am on ARv15. We support simplified and traditional Chinese in our web app and so we need to be able to support the same when we export pdf. However with the below code, of all the languages, for Chinese the text was coming blank
this.StyleSheet.Add(new DDCssLib.StyleSheetRule("font-family: Arial Unicode MS; font-style: normal; text-decoration: none; font-we" +
"ight: normal; font-size: 10pt; color: Black", "Normal"));
this.StyleSheet.Add(new DDCssLib.StyleSheetRule("font-size: 16pt; font-weight: bold", "Heading1", "Normal"));
this.StyleSheet.Add(new DDCssLib.StyleSheetRule("font-family: Times New Roman; font-size: 14pt; font-weight: bold; font-style: ita" +
"lic", "Heading2", "Normal"));
this.StyleSheet.Add(new DDCssLib.StyleSheetRule("font-size: 13pt; font-weight: bold", "Heading3", "Normal"));
this.ReportStart += new System.EventHandler(this.InspectionReport_ReportStart);
This was happening in local dev environment where the characters were loading fine in all other app. I was able to get it working in local by adding the below code. I am not sure how this gets it working but that’s the only difference I could see from one of your sample code
this.CompatibilityMode = GrapeCity.ActiveReports.Document.CompatibilityModes.CrossPlatform;
Sadly this doesn’t work in QA and Prod. They are in docker and I am not sure if fonts are missing because of that and hence not able to load the characters as in a normal machine that has fonts from MS Office. Can you please tell me a way to get this working? Is there a way I can get AR to load fonts from the deployment folder? I have google’s Noto font available in project