Our solution implements your product to render PDF reports
We had problems working on high volume output with MRT templates and XML datasources on the compilation stage
The problem was solved by using precompiled DLL templates
That approach forced us to work with .NET 4 but we wanted to use .net core or .net standard since we was aiming to a serverless solution like Amazon Lambda functions which run .net core on Linux environment
Do 2020.x version support the DLL templates?.. our initial test seems to be working
Are there any considerations in that migration? (fonts, functionality limitations, barcodes, etc)
precompiled reports on 2020.1
Re: precompiled reports on 2020.1
Just in case you need it, this is the code we use:
Code: Select all
private static string RenderPDF(Assembly DLL, string XML)
using (StiReport report = StiReport.GetReportFromAssembly(DLL))
{
report.Dictionary.Resources["DS"].Content = Convert.FromBase64String(XML);
report.Render(false);
using (MemoryStream Output = new MemoryStream())
{
var settings = new Stimulsoft.Report.Export.StiPdfExportSettings
{
UserAccessPrivileges = StiUserAccessPrivileges.PrintDocument,
ImageQuality = 0.8F,
ImageResolution = 300
};
report.ExportDocument(StiExportFormat.Pdf, Output, settings);
return Convert.ToBase64String(Output.ToArray());
}
}
}
Re: precompiled reports on 2020.1
Hello.
The precompiled reports work in .NET Core.
But it's impossible to compile the report templates in .NET Core.
If you will use our tool on Linux, you should load all used font files into a special collection and these files should be installed in the host system.
Or you could get issues with text measurement.
Thank you.
The precompiled reports work in .NET Core.
But it's impossible to compile the report templates in .NET Core.
If you will use our tool on Linux, you should load all used font files into a special collection and these files should be installed in the host system.
Or you could get issues with text measurement.
Code: Select all
Stimulsoft.Base.StiFontCollection.addOpentypeFontFile("data/arial.ttf", "Arial");
Stimulsoft.Base.StiFontCollection.addOpentypeFontFile("data/arialuni.TTF", "Arial Unicode MS");
Stimulsoft.Base.StiFontCollection.addOpentypeFontFile("data/simsunb.ttf", "SimSun-ExtB");