2

I am trying to convert PowerPoint slides into a PNG. I know that there are several ways that allow to do this by allowing for changing the resolution (e.g., within PowerPoint by changing the registry, or using PDF printers as proposed here and here).

However, always changing the registry is cumbersome and using the PDF printer (bullzip printer and pdfforge) is not working as expected.

Does anyone know of easy, free and reliable way to export PowerPoint (2010) slides into PNG pictures while allowing to easily change the resolution?

Henrik
  • 121

5 Answers5

3

I just went through this, and PowerPoint is pretty ridiculous in its restrictions on export resolution. However, I skirted around it by exporting to PDF, and from Acrobat exporting to PNG; Acrobat gives you a lot of options for export resolution and this approach worked fine. This allows you to end up with a high-quality PNG of your PowerPoint slide(s).

I'm sure this path would work well with a free tool like GIMP as well, as I believe GIMP understands PDF's.

2

[In case non-Superusers (like me) get here, this is easy; see appended below]

Based on the answer above provided by Steve Rindsberg (Thank you so much!!!), the following code creates individual PNGs at 3840 pixels width (i.e. width for standard 4K resolution) for all slides in the current PPTX file. This is ideal e.g. for image output for on-screen poster presentations or for supplementary image output for scientific figures. I have been going crazy (PDF-printing and -exporting, PNG-exporting, including third-party plugins, all at bad output resolutions for bitmaps) until I came across Steve's code. Tested for Office 2021.

Sub ExportMe()
    Dim ExportPath As String
    Dim Pixwidth As Integer, Pixheight As Integer
    Dim oSlide As Slide
' Edit to suit. Set whatever value you like here
Pixwidth = 3840

' Set height proportional to slide height
Pixheight = (Pixwidth * ActivePresentation.PageSetup.SlideHeight) / ActivePresentation.PageSetup.SlideWidth
ExportPath = ActivePresentation.Path & "\"
For i = 1 To ActivePresentation.Slides.Count
    Set oSlide = ActivePresentation.Slides(i)
    With oSlide
        .Export ExportPath & "Slide" & CStr(.SlideIndex) & ".PNG", "PNG", Pixwidth, Pixheight
    End With
Next

End Sub

[For amateurs like me: press <Alt>+<F11> in PowerPoint to get to the VBA editor and then on the left-hand side right-click on VBAProject (Filename)" or "Modules" to choose "Insert>Module" in the context menu and then to paste the code above in the newly created "Module1 (Code)" window. Press F5 (or click the Play button) to run the macro and check in the file directory if the PNGs have been created. To save the file with the macro, Save As .PPTM format afterwards.]

2

If you don't mind getting a little VBA under your fingernails, there's some sample code on my PowerPoint FAQ site that explains how to do it:

Export slides as graphics http://www.pptfaq.com/FAQ00022_Export_slides_as_graphics.htm

Minor caveats:

Some versions won't let you export at > 3072 pixels

If you have PowerPoint 2007 w/o service pack 1 at least, the exports will get munged

Some versions of 2007 and, I think, 2010 will give you odd lines at right and top/bottom if you export at over 3000 pixels or so. Stick with 3000 and you should be ok.

Sub ExportMe()
    Dim ExportPath As String 
    Dim Pixwidth As Integer, Pixheight As Integer
    Dim oSlide As Slide

    ' Edit to suit. Set whatever value you like here
    Pixwidth = 1024

    ' Set height proportional to slide height
    Pixheight = (Pixwidth * ActivePresentation.PageSetup.Slideheight) / ActivePresentation.PageSetup.Slidewidth
    ExportPath = ActivePresentation.Path & "\"
    Set oSlide = ActiveWindow.View.Slide
    With oSlide
        .Export ExportPath & "Slide" & CStr(.SlideIndex) & ".JPG", "JPG", Pixwidth, Pixheight
    End With
End Sub
nixda
  • 27,634
0

This should be pretty reliable. Set Powerpoint to export as 300dpi PNG. Then use Irfanview to change the resolution - you can either do slides individually or as a batch.

BJ292
  • 2,080
  • 14
  • 12
0

Just to propose one more program which can help:

imagemagick

You will need to export slides as PNG or JPEG lets say. After that you can bulk convert/change resolution of them with the above program.

VL-80
  • 4,693