This code:
Code:
Paragraph p = row.Cells[1].AddParagraph(signee);
p.Format.Font.Name = "Monotype Corsiva";
Throws the following exception when rendered:
Quote:
"Font 'Monotype Corsiva' does not support style 'Regular'."
And the stacktrace:
Quote:
at System.Drawing.Font.CreateNativeFont()
at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit)
at PdfSharp.Drawing.XFont.Initialize()
at PdfSharp.Drawing.XFont..ctor(String familyName, Double emSize, XFontStyle style, XPdfFontOptions pdfOptions)
at MigraDoc.Rendering.FontHandler.FontToXFont(Font font, PdfFontEncoding encoding, PdfFontEmbedding fontEmbedding)
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()
at PMD.ManufacturingStudio.ProductionBuildModule.MSDocumentBase.RenderAndSaveDocument(String filename)
at PMD.ManufacturingStudio.ProductionBuildModule.BuildOrderDocument.CreateDocument(String filename)
at PMD.ManufacturingStudio.ProductionBuildModule.BuildOrdersViewPresenter.PrintOrder(BuildOrder buildOrder)
Anyone have any ideas for me? Am I doing this wrong?