步骤3:将PPT文档转换为PDF文档。 presentation.SaveToFile( " ToPdf.pdf ", FileFormat.PDF);
步骤4:启动文档查看效果。 System.Diagnostics.Process.Start( " ToPdf.pdf ");
原PPT文档截图:
转换成PDF后效果截图:
全部代码:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Spire.Presentation; namespace PPT转PDF { class Program { static void Main( string[] args) { Presentation presentation = new Presentation(); presentation.LoadFromFile( " Sample.pptx "); presentation.SaveToFile( " ToPdf.pdf ", FileFormat.PDF); System.Diagnostics.Process.Start( " ToPdf.pdf "); } } }
转载于:https://www.cnblogs.com/Yesi/p/4835702.html
相关资源:JAVA上百实例源码以及开源项目