Reputation: 31
I have Exception error when Report.ExportDocument in asp.net core 3.1 like bellow code the Error : "Exception in PdfFonts.GetFontMetrics, font 'Arial' step #40: 'Index was outside the bounds of the array". Please Help ME how to solved this error!!!
StiReport Report = new StiReport();
Report.Load($"{path}\\Repot\\Mahdi.mrt");
Report.Render();
Report.ExportDocument(StiExportFormat.Pdf, $"{path}\\Repot\\MyPdf.pdf", Settings);
Upvotes: 0
Views: 613
Reputation: 86
A similar error has already been resolved. Try using a more recent version of the product.
Upvotes: 0
Reputation: 27997
I suggest you could try to add the font info file and to use the font info file you should add the information about the necessary fonts to FontsInfoStore with the following:
Stimulsoft.Report.Export.FontsInfoStore.LoadFontInfoToStore("Arial", "Arial.fiz");
Upvotes: 0