Picked up a project. This was using PDFSharp 1.32 WPF build to generate pdfs which didn't seem to support rtf generation so I swapped in the GDI+ nuget package instead. Great, can generate rtfs. Deploy to staging server (Azure) and can't generate any pdfs. 'Internal error. Font data could not retrieved.' I'm guessing installing fonts to Azure will be problematic. Google says 'private fonts' are the answer.
But google also found this in another post: 'You obviously are using the GDI+ build of PDFsharp 1.32. Private fonts do not work with the GDI+ build 1.32, so please try the WPF build.' (
http://forum.pdfsharp.net/viewtopic.php ... 1745#p8963)
Given all this, what is my best way forward?
Stack trace:
[InvalidOperationException: Internal error. Font data could not retrieved.]
PdfSharp.Fonts.OpenType.FontData.CreateGdiFontImage(XFont font, XPdfFontOptions options) +452
PdfSharp.Fonts.OpenType.FontData..ctor(XFont font, XPdfFontOptions options) +53
PdfSharp.Fonts.OpenType.OpenTypeDescriptor..ctor(XFont font, XPdfFontOptions options) +85
PdfSharp.Fonts.FontDescriptorStock.CreateDescriptor(XFont font) +173
PdfSharp.Drawing.XFont.get_Metrics() +29
PdfSharp.Drawing.XFont.Initialize() +172
MigraDoc.Rendering.FontHandler.FontToXFont(Font font, XPrivateFontCollection pfc, PdfFontEncoding encoding, PdfFontEmbedding fontEmbedding) +140
MigraDoc.Rendering.ParagraphRenderer.get_CurrentFont() +40
MigraDoc.Rendering.ParagraphRenderer.InitFormat(Area area, FormatInfo previousFormatInfo) +459
MigraDoc.Rendering.ParagraphRenderer.Format(Area area, FormatInfo previousFormatInfo) +62
MigraDoc.Rendering.TopDownFormatter.FormatOnAreas(XGraphics gfx, Boolean topLevel) +726
MigraDoc.Rendering.FormattedDocument.Format(XGraphics gfx) +916
MigraDoc.Rendering.DocumentRenderer.PrepareDocument() +389
MigraDoc.Rendering.PdfDocumentRenderer.PrepareDocumentRenderer(Boolean prepareCompletely) +113
MigraDoc.Rendering.PdfDocumentRenderer.PrepareRenderPages() +19
MigraDoc.Rendering.PdfDocumentRenderer.RenderDocument() +13
Ta.