Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Export of PowerPoint slides to high quality Bitmaps

0.00/5 (No votes)
9 Jun 2005 1  
Export powerpoint slides as bitmaps using screen capture.

Introduction

I�m currently working on a project that involves bitmaps from PowerPoint (PP) presentations. Saving a presentation as JPEG from PP doesn�t satisfy me at all. Hard compressed files, no anti alias text, no control over the size of the images etc. etc. frustrates me really. If you have experienced the same, then read on.

Background

An article by Mark Belles on screen capturing here at CodeProject inspired me to create the following application.

Using the code

The main engine is a class, PowerPointDump that has only one method, Dump. Dump loops through all the slides in the presentation window and dumps the screens into PNG images, but first it sets the size of the presentation window to match our choice of bitmap size.

To enable myself to control PowerPoint I've made a reference to the "Microsoft Office 9.0 Object Library" COM object. So you need PP in your computer (suffice to say?). I could of course have used the primary interop assembly (PIA) for office XP, but I�m still on Office 2000.

Just for fun I�ve used a singleton pattern for the engine. Its use is straightforward:

int result = 
    PowerPointDump.Instance.Dump(inputPath, 
              outputPath, 800, 600,
              Screen.PrimaryScreen.Bounds.Width,
              Screen.PrimaryScreen.Bounds.Height );

Points of interest

With the help of the screen capture code, I could realize my idea of how to get nice bitmaps from the PP slides. So this little article is a small payback to all of you contributing to CodeProject.

History

  • Posted on June 8th, 2005.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here