Aspose.Words将word转成pdf

2021-05-02 23:31

阅读:481

标签:substring   turn   class   static   exists   pos   new   doc   director   

Aspose.Words将word转成pdf

/// 
        /// word转pdf
        /// 
        /// 文件地址
        /// 转换后的文件地址
        /// 
        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);
        }

 

Aspose.Words将word转成pdf

标签:substring   turn   class   static   exists   pos   new   doc   director   

原文地址:https://www.cnblogs.com/jiangqw/p/12124080.html

上一篇:JS模块化

下一篇:wine + source insight


评论


亲,登录后才可以留言!