Hello.
I use PdfSharpCore version 1.3.63 (.NET Core 6) to generate a PDF-file with code like this:
var pdf = PdfGenerator.GeneratePdf(html, PageSize.A4, 10, null, null, null);
I get an exception if I call this code simultaneously in two or more threads:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at PdfSharpCore.Fonts.OpenType.OpenTypeFontface.CreateFontSubSet(Dictionary`2 glyphs, Boolean cidFont)
at PdfSharpCore.Pdf.Advanced.PdfCIDFont.PrepareForSave()
at PdfSharpCore.Pdf.Advanced.PdfType0Font.PrepareForSave()
at PdfSharpCore.Pdf.Advanced.PdfFontTable.PrepareForSave()
at PdfSharpCore.Pdf.PdfDocument.PrepareForSave()
at PdfSharpCore.Pdf.PdfDocument.DoSave(PdfWriter writer)
at PdfSharpCore.Pdf.PdfDocument.Save(Stream stream, Boolean closeStream)
Hello. I use PdfSharpCore version 1.3.63 (.NET Core 6) to generate a PDF-file with code like this: var pdf = PdfGenerator.GeneratePdf(html, PageSize.A4, 10, null, null, null);
I get an exception if I call this code simultaneously in two or more threads: System.IndexOutOfRangeException: Index was outside the bounds of the array. at PdfSharpCore.Fonts.OpenType.OpenTypeFontface.CreateFontSubSet(Dictionary`2 glyphs, Boolean cidFont) at PdfSharpCore.Pdf.Advanced.PdfCIDFont.PrepareForSave() at PdfSharpCore.Pdf.Advanced.PdfType0Font.PrepareForSave() at PdfSharpCore.Pdf.Advanced.PdfFontTable.PrepareForSave() at PdfSharpCore.Pdf.PdfDocument.PrepareForSave() at PdfSharpCore.Pdf.PdfDocument.DoSave(PdfWriter writer) at PdfSharpCore.Pdf.PdfDocument.Save(Stream stream, Boolean closeStream)
Can you plese solve the issue? Thank you