【发布时间】:2020-10-01 20:45:41
【问题描述】:
table.Rows[0].Cells[4].AddParagraph("0123456789ABCDEFGHIJKLMNOPQRSTUVWYXZ")
.Format.Font.ApplyFont(new Font("barcode", 36));
...
var documentRenderer = new DocumentRenderer(_document);
documentRenderer.PrepareDocument(); //<--- crash here
它通过我的自定义字体解析器ResolveTypeface("barcode", false, false) 和GetFont("barcode.ttf") 符合预期。
然后它通过ResolveTypeface("New", false, false) 出现。我不知道“新”从何而来。
如果我将 new Font("barcode", 36) 更改为 new Font("Arial", 36) 一切都很好,它从不要求字体为“New”。我尝试了另一种字体,以防万一那里出现问题。我查看了 MigraDoc / PdfSharpCore 源代码,但没有看到对硬编码的“新”字符串的引用。
【问题讨论】:
标签: .net-core pdfsharp migradoc