PPT导出为图片
使用Aspose组件导出 Aspose有Aspose.Slides.dll,可以无需安装office,进行读写PPT文件。 Aspose可能通过Aspose.Slides.NET安装 简单的导出图片demo,如下: 1 internal class PptToImagesConverter 2 { 3 private const string ImageExtension = ".png"; 4 public bool ConvertToImages(string pptFile, string exportImagesFolder) 5 { 6 using (Presentation pres = new Presentation(pptFile)) 7 { 8 int desiredX = 1200; 9 int desiredY = 800; 10 11 float scaleX = (float)(1.0 / pres.SlideSize.Size.Width) * desiredX; 12 float scaleY = (float)(1.0 / pres.SlideSize.Size.Height) * desiredY; 13 14 foreach (ISlide sld in pres.Slides) 15 { 16 Bitmap bmp = sld