我正在使用Aspose.Words.dll
将 word Doc 转换为 PDF
这是我的代码
var fileName = System.AppDomain.CurrentDomain.BaseDirectory
+ Guid.NewGuid().ToString();
File.WriteAllBytes(fileName + ".docx", wordBytes);
var doc = new Aspose.Words.Document(fileName + ".docx");
doc.Save(fileName + ".pdf");
如果我运行上面的代码,它会成功将 Word 转换为 PDF。
但我的问题是我的单词中有条形码字体,而 PDF 中没有显示。尽管有条形码,但它会在 PDF 文档中显示字母。
我的系统中安装了所有字体。
我也试过像下面这样,
var saveOptions = new PdfSaveOptions();
saveOptions.EmbedFullFonts = true;
doc.Save(fileName + ".pdf", saveOptions);
但什么都不会发生。
谁能帮我解决这个问题?