Click here to Skip to main content
15,867,834 members
Articles / Programming Languages / C#
Article

Export of PowerPoint slides to high quality Bitmaps

Rate me:
Please Sign up or sign in to vote.
4.33/5 (6 votes)
9 Jun 2005CPOL1 min read 78.4K   2K   45   14
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:

C#
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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Sweden Sweden
Running the company LäraNära AB in Sweden, developing and marketing a tool for distance learning.

Comments and Discussions

 
GeneralMy vote of 5 Pin
SYED SH23-Jul-10 9:11
SYED SH23-Jul-10 9:11 
QuestionExport of PowerPoint slides to Text? Pin
gecgin7-Jul-09 10:16
gecgin7-Jul-09 10:16 
I need the text of slides page by page.
I need to create the txt files like that
slide1.txt
slide2.txt..

Can you help me?
AnswerRe: Export of PowerPoint slides to Text? Pin
Staffan Sjöstedt9-Jul-09 20:14
Staffan Sjöstedt9-Jul-09 20:14 
GeneralRequest for VS2005/8 version Pin
UltraWhack12-Jun-08 3:35
UltraWhack12-Jun-08 3:35 
GeneralRe: Request for VS2005/8 version Pin
Staffan Sjöstedt9-Jul-09 20:28
Staffan Sjöstedt9-Jul-09 20:28 
GeneralHej! Pin
Zorbek1-Feb-07 22:52
Zorbek1-Feb-07 22:52 
GeneralRe: Hej! Pin
Staffan Sjöstedt2-Feb-07 1:59
Staffan Sjöstedt2-Feb-07 1:59 
GeneralRe: Hej! Pin
Zorbek2-Feb-07 5:49
Zorbek2-Feb-07 5:49 
QuestionSingleton for export of PowerPoint presentations into good looking bitmaps [modified] Pin
jschafer6-Dec-06 10:03
jschafer6-Dec-06 10:03 
AnswerRe: Singleton for export of PowerPoint presentations into good looking bitmaps Pin
Staffan Sjöstedt6-Dec-06 10:54
Staffan Sjöstedt6-Dec-06 10:54 
GeneralHardwired capture size Pin
fwsouthern9-Jun-05 8:03
fwsouthern9-Jun-05 8:03 
GeneralRe: Hardwired capture size Pin
Staffan Sjöstedt9-Jun-05 19:40
Staffan Sjöstedt9-Jun-05 19:40 
Generalhmmmm Pin
Anonymous9-Jun-05 3:39
Anonymous9-Jun-05 3:39 
GeneralRe: hmmmm Pin
Staffan Sjöstedt9-Jun-05 19:50
Staffan Sjöstedt9-Jun-05 19:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.