System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
- Woodcutter
- Posts: 56
- Joined: Wed Mar 01, 2017 2:17 am
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
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");
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");
-
- Posts: 6358
- Joined: Tue Mar 20, 2018 5:34 am
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
Hello,
Please send us a sample project that reproduces the issue for analysis.
Thank you.
Please send us a sample project that reproduces the issue for analysis.
Thank you.
- Woodcutter
- Posts: 56
- Joined: Wed Mar 01, 2017 2:17 am
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
Hey Lech
Project is in attached DE.zip
RGDS
Henry
Project is in attached DE.zip
RGDS
Henry
- Attachments
-
- De.zip
- (333.68 KiB) Downloaded 44 times
-
- Posts: 6358
- Joined: Tue Mar 20, 2018 5:34 am
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
Hello,
Please check the correct path to the font file.
Thank you.
Please check the correct path to the font file.
Thank you.
- Attachments
-
- Screenshot 2024-04-24 101556.png (254.97 KiB) Viewed 376 times
- Woodcutter
- Posts: 56
- Joined: Wed Mar 01, 2017 2:17 am
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
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
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
- Attachments
-
- 微信图片_202404242129291.png (102.73 KiB) Viewed 365 times
- Woodcutter
- Posts: 56
- Joined: Wed Mar 01, 2017 2:17 am
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
There are 2 reports with problem font.
Thanks for your help.
Thanks for your help.
- Attachments
-
- TestMRZ_simkai.mrz
- (1.42 KiB) Downloaded 36 times
-
- TestMRZ_MSYH.mrz
- (1.41 KiB) Downloaded 38 times
-
- Posts: 6358
- Joined: Tue Mar 20, 2018 5:34 am
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
Hello,
Please send your fonts also for analysis.
Thank you.
Please send your fonts also for analysis.
Thank you.
- Woodcutter
- Posts: 56
- Joined: Wed Mar 01, 2017 2:17 am
-
- Posts: 6358
- Joined: Tue Mar 20, 2018 5:34 am
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
Hello,
We need some additional time to investigate the issue, we will let you know about the result.
Thank you.
We need some additional time to investigate the issue, we will let you know about the result.
Thank you.
-
- Posts: 6358
- Joined: Tue Mar 20, 2018 5:34 am
Re: System.IO.FileNotFoundException: Could not load file or assembly System.Windows.Forms
Hello,
Please add alias name of the fonts:
StiFontCollection.AddFontFile("simkai.ttf", "楷体");
Thank you.
Please add alias name of the fonts:
StiFontCollection.AddFontFile("simkai.ttf", "楷体");
Thank you.