/// <summary> /// word转pdf /// </summary> /// <param name="path">文件地址</param> /// <param name="newFilePath">转换后的文件地址</param> /// <returns></returns> public static void WordToPdf(string path, string newFilePath) { var dir = newFilePath.Substring(0, newFilePath.LastIndexOf("/") + 1); if (!Directory.Exists(dir)) { Directory.CreateDirectory(dir); } Aspose.Words.Document doc = new Aspose.Words.Document(path); doc.Save(newFilePath); }
原文地址:https://www.cnblogs.com/jiangqw/p/12124080.html
时间: 2024-10-11 10:33:24