Page 2 of 3
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
Posted: Tue Apr 23, 2024 12:35 pm
by Woodcutter
The code:
StiFontCollection.AddFontFile("msyh");
StiFontCollection.AddFontFile("Arial Unicode MS");
Stimulsoft.Report.StiReport report = new Stimulsoft.Report.StiReport();
report.Load(@"TestMRZ7.mrz");
report.Render();
if (File.Exists(@"d:\aaa.pdf") == true) File.Delete(@"d:\aaa.pdf");
report.ExportDocument(Stimulsoft.Report.StiExportFormat.Pdf, @"d:\aaa.pdf");
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
Posted: Tue Apr 23, 2024 9:12 pm
by Lech Kulikowski
Hello,
Please send us a sample project that reproduces the issue for analysis.
Thank you.
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
Posted: Wed Apr 24, 2024 2:35 am
by Woodcutter
Hey Lech
Project is in attached DE.zip
RGDS
Henry
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
Posted: Wed Apr 24, 2024 8:16 am
by Lech Kulikowski
Hello,
Please check the correct path to the font file.
Thank you.
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
Posted: Wed Apr 24, 2024 1:32 pm
by Woodcutter
Hi Lech:
Base on your code ,In my computer,
set to "Arial Unicode MS"
StiFontCollection.AddFontFile("ARIALUNI.ttf");
Works OK.
set to "微软雅黑"
StiFontCollection.AddFontFile("msyh.ttc");
Works NG.
set to "楷体"
StiFontCollection.AddFontFile("simkai.ttf");
Works NG.
I have copy the font file to my EXE folder, but Chinese fonts still not good for display else "Arial Unicode MS".
There are test fonts download url as bellow
http://124.71.79.242/test/TestFont.zip
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
Posted: Thu Apr 25, 2024 1:22 am
by Woodcutter
There are 2 reports with problem font.
Thanks for your help.
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
Posted: Thu Apr 25, 2024 7:55 am
by Lech Kulikowski
Hello,
Please send your fonts also for analysis.
Thank you.
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
Posted: Thu Apr 25, 2024 8:53 am
by Woodcutter
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
Posted: Fri Apr 26, 2024 8:52 am
by Lech Kulikowski
Hello,
We need some additional time to investigate the issue, we will let you know about the result.
Thank you.
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
Posted: Fri Apr 26, 2024 9:21 am
by Lech Kulikowski
Hello,
Please add alias name of the fonts:
StiFontCollection.AddFontFile("simkai.ttf", "楷体");
Thank you.