Welcome to the ASP.NET Core feedback portal. We’re happy you’re here! If you have feedback on how to improve the ASP.NET Core, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
When working in a multithreaded environment PdfTrueTypeFonts cannot be reused. The following exceptions may occur:
Starting with:
Destination array was not long enough. Check the destination index, length, and the array's lower bounds. (Parameter 'destinationArray') at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Array.Copy(Array sourceArray, Array destinationArray, Int32 length) at System.Collections.Generic.Dictionary`2.Resize(Int32 newSize, Boolean forceNewHashCodes) at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at Syncfusion.Pdf.Graphics.Fonts.UnicodeTrueTypeFont.SetSymbols(String text) at Syncfusion.Pdf.Graphics.PdfTrueTypeFont.SetSymbols(String text) at Syncfusion.Pdf.Graphics.PdfGraphics.ConvertToUnicode(String text, PdfTrueTypeFont ttfFont, PdfStringFormat format) at Syncfusion.Pdf.Graphics.PdfGraphics.DrawUnicodeLine(LineInfo lineInfo, RectangleF layoutRectangle, PdfFont font, PdfStringFormat format) at Syncfusion.Pdf.Graphics.PdfGraphics.DrawLayoutResult(PdfStringLayoutResult result, PdfFont font, PdfStringFormat format, RectangleF layoutRectangle) at Syncfusion.Pdf.Graphics.PdfGraphics.DrawStringLayoutResult(PdfStringLayoutResult result, PdfFont font, PdfPen pen, PdfBrush brush, RectangleF layoutRectangle, PdfStringFormat format) at Syncfusion.Pdf.Graphics.PdfGraphics.DrawString(String s, PdfFont font, PdfPen pen, PdfBrush brush, RectangleF layoutRectangle, PdfStringFormat format) at Syncfusion.Pdf.Graphics.PdfGraphics.DrawString(String s, PdfFont font, PdfPen pen, PdfBrush brush, Single x, Single y, PdfStringFormat format) at Syncfusion.Pdf.Graphics.PdfGraphics.DrawString(String s, PdfFont font, PdfPen pen, PdfBrush brush, PointF point, PdfStringFormat format) at Syncfusion.Pdf.Graphics.PdfTextElement.DrawInternal(PdfGraphics graphics) at Syncfusion.Pdf.Graphics.PdfGraphicsElement.Draw(PdfGraphics graphics, Single x, Single y) at Syncfusion.Pdf.Graphics.PdfGraphicsElement.Draw(PdfGraphics graphics, PointF location) at Syncfusion.Pdf.Graphics.PdfGraphicsElement.Draw(PdfGraphics graphics)
System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
at Syncfusion.Pdf.Primitives.PdfDictionary.SaveItems(IPdfWriter writer)
at Syncfusion.Pdf.Primitives.PdfDictionary.Save(IPdfWriter writer, Boolean bRaiseEvent)
at Syncfusion.Pdf.Primitives.PdfStream.Save(IPdfWriter writer)
at Syncfusion.Pdf.IO.PdfCrossTable.DoSaveObject(IPdfPrimitive obj, PdfReference reference, PdfWriter writer)
at Syncfusion.Pdf.IO.PdfCrossTable.SaveIndirectObject(IPdfPrimitive obj, PdfWriter writer)
at Syncfusion.Pdf.IO.PdfCrossTable.SaveObjects(PdfWriter writer)
at Syncfusion.Pdf.IO.PdfCrossTable.Save(PdfWriter writer)
at Syncfusion.Pdf.PdfDocument.Save(Stream stream)
or
System.Collections.Generic.KeyNotFoundException: The given key '/Filter' was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Syncfusion.Pdf.Primitives.PdfStream.AddFilter(String filterName)
at Syncfusion.Pdf.Primitives.PdfStream.CompressContent(IPdfWriter writer)
at Syncfusion.Pdf.Primitives.PdfStream.Save(IPdfWriter writer)
at Syncfusion.Pdf.IO.PdfCrossTable.DoSaveObject(IPdfPrimitive obj, PdfReference reference, PdfWriter writer)
at Syncfusion.Pdf.IO.PdfCrossTable.SaveIndirectObject(IPdfPrimitive obj, PdfWriter writer)
at Syncfusion.Pdf.IO.PdfCrossTable.SaveObjects(PdfWriter writer)
at Syncfusion.Pdf.IO.PdfCrossTable.Save(PdfWriter writer)
at Syncfusion.Pdf.PdfDocument.Save(Stream stream)
and ends up being in a deadlock situation with this error:
System.InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
at System.Collections.Generic.Dictionary`2.Remove(TKey key)
at Syncfusion.Pdf.Primitives.PdfDictionary.Remove(PdfName key)
at Syncfusion.Pdf.Primitives.PdfStream.Clear()
at Syncfusion.Pdf.Graphics.Fonts.UnicodeTrueTypeFont.GenerateCmap()
at Syncfusion.Pdf.Primitives.PdfDictionary.OnBeginSave(SavePdfPrimitiveEventArgs args)
at Syncfusion.Pdf.Primitives.PdfStream.Save(IPdfWriter writer)
at Syncfusion.Pdf.IO.PdfCrossTable.DoSaveObject(IPdfPrimitive obj, PdfReference reference, PdfWriter writer)
at Syncfusion.Pdf.IO.PdfCrossTable.SaveIndirectObject(IPdfPrimitive obj, PdfWriter writer)
at Syncfusion.Pdf.IO.PdfCrossTable.SaveObjects(PdfWriter writer)
at Syncfusion.Pdf.IO.PdfCrossTable.Save(PdfWriter writer)
at Syncfusion.Pdf.PdfDocument.Save(Stream stream)