使用 Microsoft.Office.Interop.Word 将word文档转为PDF 在NuGet中搜索 Microsoft.Office.Interop.Word 安装 方法 参数参考 微软官网地址 /// <summary> /// 将word转成PDF office /// </summary> /// <param name="sourcePath"></param> /// <param name="targetPath"></param> /// <returns></returns> public static bool WordToPDFWithOffice(string sourcePath, string targetPath, int fromPage = 1, int toPage = 1) { bool result = false; Microsoft.Office.Interop.Word.Application application = new Microsoft.Office.Interop.Word.Application();...