Code: Select all
foreach (var file in System.IO.Directory.GetFiles("C:\\Windows\\Fonts"))
{
Stimulsoft.Base.StiFontCollection.AddFontFile(file);
}
Code: Select all
foreach (var file in System.IO.Directory.GetFiles("C:\\Windows\\Fonts"))
{
Stimulsoft.Base.StiFontCollection.AddFontFile(file);
}
Not reproduced anymoreI upgraded to latest version and found one more issue:
Image is not exported.
Code: Select all
StiFontCollection.AddFontFile(fileName)
Code: Select all
StiOptions.Export.Pdf.AllowInvokeWindowsLibraries = false;
foreach (var fileName in Directory.GetFiles(@"C:\Windows\Fonts"))
{
try
{
StiFontCollection.AddFontFile(fileName);
}
catch (Exception ex) { }
}
Code: Select all
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
COPY ./Fonts ./Fonts
COPY ./InstallFonts.ps1 ./Fonts
RUN ["powershell.exe", "./Fonts/InstallFonts.ps1"]