The word transferred into pdf Aspose.Words

The word transferred into pdf Aspose.Words

///  <Summary> 
        /// Word transfected PDF
         ///  </ Summary> 
        ///  <param name = "path"> File Address </ param> 
        ///  <param name = "newFilePath"> after conversion file address </ param> 
        ///  <Returns> </ Returns> 
        public  static  void WordToPdf ( String path, String newFilePath) 
        { 
            var the 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);
        }

 

Guess you like

Origin www.cnblogs.com/jiangqw/p/12124080.html