我正在使用以下方法将 word 保存为 pdf:
private Microsoft.Office.Interop.Word.Application _wordApp;
_wordApp.ActiveDocument.EmbedTrueTypeFonts = true;
_wordApp.ActiveDocument.SaveAs2(MergedDocumentFullOutputPath, Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatPDF);
我可以另存为 pdf,但很少有字体未嵌入。如果可能的话,我也想嵌入系统字体。
最佳答案
Word 2013-2016 不支持使用 Open Type Fonts (.otf) 或其他格式嵌入字体,仅完全支持使用 TrueType Fonts (.ttf)。
要解决此问题,您只需按照以下简单步骤操作即可:
- 使用转换器将字体转换为 .ttf。我用过这个网站 Online Font Converter .
- 安装转换后的文件。你会 提示字体已经安装,选择"is"替换 旧安装。
- 享受 :)
关于c# - 转换为 pdf c# 时 word interop 嵌入字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35630069/