Page 1 of 1

Net.Standart 2.0 PdfFonts error at point 8, code #80004005

Posted: Tue Jan 26, 2021 5:05 am
by alibekUrazgulov
I get an error "PdfFonts error at point 8, code #80004005". An error occurs if "StiOptions.Export.Pdf.AllowImportSystemLibraries = true;". The error disappears for a while if you restart the server.
If "StiOptions.Export.Pdf.AllowImportSystemLibraries = false;", then there is no error, but then the standard view of pdf files in android does not display fonts.
Stimulsoft version 2020.5.1

My code:
public virtual MemoryStream GenerateStimulsoft<T>(string connectionString) where T: StiReport
{
var report = new StiReport();
report = (StiReport)Activator.CreateInstance(typeof(T));

var sqlDatabase = ((StiSqlDatabase)report.Dictionary.Databases["ReportConnection"]);
if (sqlDatabase == null) sqlDatabase = ((StiSqlDatabase)report.Dictionary.Databases[0]);

sqlDatabase.ConnectionString = connectionString;

report.Render();

var pdfSettings = new StiPdfExportSettings();
var stream = new MemoryStream();
report.ExportDocument(StiExportFormat.Pdf, stream, pdfSettings);

stream.Flush();
stream.Position = 0;
return stream;
}

Re: Net.Standart 2.0 PdfFonts error at point 8, code #80004005

Posted: Tue Jan 26, 2021 10:45 am
by Lech Kulikowski
Hello,

Please send us a sample that reproduces the issue for analysis.

Thank you.