Recent work has often been used in presentations, and has come into contact with a good free software-free spire.presentation. After the use of the software is found to be very light, function is quite complete. This software conversion function is also very good, usually encountered a variety of conversion problems, with just a few lines of code can be done. Now I'd like to share my experience with you.
interested friends can get from E-iceblue official website Download Free spire.presentation use. After the download is complete, place the bin folder. DLL is added as a reference to Visual Studio.
the PPT file into image file
Create a presentation document. Presentation Presentation = new Presentation ()//load the PPT file from Disk.presentation.LoadFromFile ("sample.pptx"); /Save the slide to image.image Image = presentation. Slides[i]. Saveasimage ();//save image to file. String fileName = String.Format ("Result-img-{0}.png", I); image. Save ("Toimage", System.Drawing.Imaging.ImageFormat.Png),//launch and view the image. System.Diagnostics.Process.Start ("Toimage");
the PPT Convert files into pptx file
Create a presentation document. Presentation Presentation = new Presentation ()//load the PPT file from Disk.presentation.LoadFromFile ("sample.ppt");// Save the PPT document to PPTX file Format.presentation.SaveToFile ("Topptx.pptx", fileformat.pptx2010);//launch and view T He resulted PPTX file. System.Diagnostics.Process.Start ("Topptx.pptx");
the PPT Convert files into XPS file
Save to the XPS file.ppt.SaveToFile ("Sample.xps", fileformat.xps);
the PPS Convert files into pptx file
Save the PPS document to PPTX file Format.presentation.SaveToFile ("Topptx.pptx", fileformat.pptx2010);
the PPT Convert files into EMF file
Save the presentation slide to EMF image.presentation.slides[2]. SAVEASEMF ("result.emf");
PS: We have discussed in the previous article to convert PPT file into PDF file, here is not much to introduce.
ppt into image, PPTX, XPS, EMF