DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Chen has posted 13 posts at DZone. View Full User Profile

Spire.Presentation for .NET-Convert PPT to Image

  • submit to reddit
private void btnRun_Click(object sender, EventArgs e)
            //create PPT document
            Presentation presentation = new Presentation();

            //load PPT file from disk

            //save PPT document to images
            for (int i = 0; i < presentation.Slides.Count; i++)
                String fileName = String.Format("result-img-{0}.png", i);
                Image image = presentation.Slides[i].SaveAsImage();
                image.Save(fileName, System.Drawing.Imaging.ImageFormat.Png);

Spire.Presentation for .NET is a professional PowerPoint compatible component that enables developers to create, read, write, and modify PowerPoint? documents from any .NET(C#, VB.NET, ASP.NET) platform. As an independent PowerPoint .NET component, Spire.Presentation for .NET doesn't need Microsoft PowerPoint installed on the machine.Spire.Presentation for .NET support PPT, PPS, PPTX and PPSX presentation formats. It provides functions such as managing text, image, shapes, tables, animations, audio and video on slides. It also support exporting presentation slides to EMF, JPG, PDF format etc.Main FunctionsAs an independent PowerPoint .NET component, Spire.Presentation for .NET doesn't need Microsoft PowerPoint installed on the machine. And it is compatible with other .NET applications.Convert Presentation Slides with High QualityBy using Spire.Presentation for .NET, developers can export presentation slides to PDF and image (Bitmap, JPG, PNG, EMF, TIFF, GIF and WMF) formats. It supports SmartArt shapre, MSO Charts components and presentation printing.Summary of Spire.Presentation functionsCreate, open, read and modify PowerPoint presentations from different sources.Convert presentation slides to image and PDF format.Create, access, copy, edit, delete slides from scratch and add created slides to presentations.Create, modify shapes like lines, rectangles, ellipses and polylines on slides.Manage, rotate and flip shapes.Add, manage animation effects to slides and shapes.Add, manage hyperlink to the shapes and text.Add, manage pictures, audio, video to the presentation slides.Support working with PowerPoint tables.Add text and handle text formatting.Protect and encrypt presentation slides.Support File FormatsSpire.Presentation for .NET supports Microsoft PowerPoint 97 - 2003 (read only) and Microsoft PowerPoint 2007, 2010.PPT - PowerPoint Presentation 97 - 2003PPS - PowerPoint SlideShow 97 - 2003PPTX - PowerPoint Presentation 2007,2010PPSX - PowerPoint SlideShow 2007,2010Platforms SupportedBy using Spire.Presentation, developers can build any type of a 32-bit or 64-bit .NET application including C#, VB.NET, ASP.NET, Web Services and WinForms for .NET Framework version from 2.0 to 4.5.Window Forms SupportAsp.NET SupportWindows Service Support
PresentationNET.png27.05 KB