예제 #1
0
 /// <summary>
 ///     Export a slide to the specified image format
 /// </summary>
 /// <param name="slide">PPT.Slide object instance</param>
 /// <param name="filePathAndName">File and Path name for the export target</param>
 /// <param name="exportFormat">Format to export to</param>
 /// <param name="scaleWidth">Scale with of the image</param>
 /// <param name="scaleHeight">Scale height of the image</param>
 public void Export(
     PPT.Slide slide,
     string filePathAndName,
     ImageFormats.Formats exportFormat,
     int scaleWidth  = 1280,
     int scaleHeight = 1024)
 {
     slide.Export(filePathAndName, exportFormat.ToString(), scaleWidth, scaleHeight);
 }
예제 #2
0
 /// <summary>
 ///     Export all slides to the specified file formats
 /// </summary>
 /// <param name="presentation">PPT.Presentation object instance</param>
 /// <param name="filePath">File Path to export all the slides to (excluding filename(s))</param>
 /// <param name="exportFormat">Format to export to</param>
 /// <param name="scaleWidth">Scale with of the image</param>
 /// <param name="scaleHeight">Scale height of the image</param>
 public void ExportAll(
     PPT.Presentation presentation,
     string filePath,
     ImageFormats.Formats exportFormat,
     int scaleWidth  = 1280,
     int scaleHeight = 1024)
 {
     foreach (PPT.Slide slide in presentation.Slides)
     {
         slide.Export(
             filePath + @"slide" + slide.SlideIndex + "." + exportFormat,
             exportFormat.ToString(),
             scaleWidth,
             scaleHeight);
     }
 }