Aspose.Words将word转成pdf

/// <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);
        }

 

相关文章:

  • 2021-12-21
  • 2021-11-17
  • 2021-12-18
  • 2021-11-21
  • 2022-12-23
  • 2021-04-07
  • 2021-11-17
  • 2021-08-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-11-29
  • 2021-12-09
  • 2021-05-02
  • 2021-07-15
相关资源
相似解决方案