# Layout-preserving converter from beamer PDF to powerpoint

Is there a way to convert a beamer PDF output to powerpoint while keeping the exact layout? I can find several tools online, but the layout is almost never conserved properly.

I don't need it to be editable, so an equivalent process to convert a multi-image PNG (as produced by Apple's preview) to powerpoint would also suffice. I have a slideshow of 150+ slides, so I'd much rather prefer not copy/pasting individual images onto powerpoint.

• Maybe I don't get it but why don't you just convert the pdf into pngs? There are several ways to do that include command line tools, online converters and GUI-based tools such as alternative pdf viewers. May 22, 2021 at 16:43
• @Dr.ManuelKuehner Thanks for the comment. As I mentioned in the question, I can already convert to PNG. What's missing is the step converting from PNG to powerpoint automatically as I don't want to manually drag/drop images onto powerpoint given the large number of slides.
– Enzo
May 22, 2021 at 19:17
• Ok, my answer provides a way to do that almost automatically. It should be good enough for a one-time thing once in a while. May 22, 2021 at 19:39

My prefered method (on Linux) is an automatic version of Dr. Manuel Kuehner's answer. https://github.com/ashafaei/pdf2pptx

It can be a little tricky to get right, particularly with ImageMagick's permissions, but afterwards it works flawlessly.

• +1: There are so many helpful tools in the www :). May 22, 2021 at 17:26
• Thanks!!! Worked like a charm on Mac (just needed to "brew install imagemagick"). That's exactly what I needed.
– Enzo
May 23, 2021 at 10:20
• Worked great for me (Debian Stretch, PowerPoint ver. 2201 Build 16.0..."). It's been my experience that the following snippet is better than convert for the image conversion step: gs -dBATCH -dNOPAUSE -sDEVICE=png16m -r600 -sOutputFile="$tempname"/'slide-%d.png' "$1". Since the output file numbering scheme is different than when using convert, recommend you choose a fork to the subject script that uses pdftoppm for the image conversion step (FYI, I used the mickaelseznec fork). Feb 8 at 4:48

## Step 1: Generate the Beamer Presentation (Single PDF File)

\documentclass[
aspectratio = 169,
]{beamer}

\usepackage{pgffor}

\begin{document}

% https://tex.stackexchange.com/questions/544528
\foreach \nn in {A,B,C,D,E,F}{
\begin{frame}
\frametitle{Frame Title \nn}
\nn
\end{frame}
}

\end{document}


## Step 2: Convert the Single PDF File Into Several PNG Files

1. Online converter, e. g. https://pdf2png.com.
2. PDF viewer, e. g. PDF-Exchange Editor or similar. There's typically an export option (or "save as"). It can be that this feature is not available in the free version.
3. Command line tool, e. g. ImageMagick.

## Step 3: Import PNGs Into PowerPoint

PowerPoint has a feature that allows you to generate a presentation based on pictures in a folder. My screenshots show the German GUI but I believe that it is self-explanatory once you know what you are looking for.

## Step 4: Enjoy! :)

I found this tool to convert PDF's to Apple's Keynote slideshow format: https://www.cs.hmc.edu/~oneill/freesoftware/pdftokeynote.html

It only runs on OSX, so I'm unable to test it, but because you mentioned "Apple's preview" I'm guessing that won't be a problem for you.

After that there are plenty of tools to convert from Keynote to PPT. I found this with a quick google search: https://www.zamzar.com/convert/key-to-ppt/