Using PdfSharp-MigraDoc-gdi NuGet package v1.51.5186-betaAs the title says I am getting an exception using the Tahoma font:
Code:
An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at PdfSharp.Fonts.FontFactory.CacheNewFontSource(String typefaceKey, XFontSource fontSource)
at PdfSharp.Drawing.XFontSource.GetOrCreateFrom(String typefaceKey, Byte[] fontBytes)
at PdfSharp.Fonts.PlatformFontResolver.CreateFontSource(String familyName, FontResolvingOptions fontResolvingOptions, Font& font, String typefaceKey)
at PdfSharp.Fonts.PlatformFontResolver.ResolveTypeface(String familyName, FontResolvingOptions fontResolvingOptions, String typefaceKey)
at PdfSharp.Fonts.FontFactory.ResolveTypeface(String familyName, FontResolvingOptions fontResolvingOptions, String typefaceKey)
at PdfSharp.Drawing.XGlyphTypeface.GetOrCreateFrom(String familyName, FontResolvingOptions fontResolvingOptions)
at PdfSharp.Drawing.XFont.Initialize()
at MigraDoc.Rendering.FontHandler.FontToXFont(Font font, PdfFontEncoding encoding)
at MigraDoc.Rendering.ParagraphRenderer.get_CurrentFont()
at MigraDoc.Rendering.ParagraphRenderer.CalcCurrentVerticalInfo()
at MigraDoc.Rendering.ParagraphRenderer.InitFormat(Area area, FormatInfo previousFormatInfo)
at MigraDoc.Rendering.ParagraphRenderer.Format(Area area, FormatInfo previousFormatInfo)
at MigraDoc.Rendering.TopDownFormatter.FormatOnAreas(XGraphics gfx, Boolean topLevel)
at MigraDoc.Rendering.FormattedCell.Format(XGraphics gfx)
at MigraDoc.Rendering.TableRenderer.FormatCells()
at MigraDoc.Rendering.TableRenderer.InitFormat(Area area, FormatInfo previousFormatInfo)
at MigraDoc.Rendering.TableRenderer.Format(Area area, FormatInfo previousFormatInfo)
at MigraDoc.Rendering.TopDownFormatter.FormatOnAreas(XGraphics gfx, Boolean topLevel)
at MigraDoc.Rendering.FormattedDocument.Format(XGraphics gfx)
at MigraDoc.Rendering.DocumentRenderer.PrepareDocument()
at MigraDoc.Rendering.PdfDocumentRenderer.PrepareDocumentRenderer(Boolean prepareCompletely)
at MigraDoc.Rendering.PdfDocumentRenderer.PrepareRenderPages()
at MigraDoc.Rendering.PdfDocumentRenderer.RenderDocument()
And I can't seem to find out why... So I would like to know if there's a known issue about this. And better yet if there's a fix for this problem.
Thank you in advance