29

I usually prepare my talks using powerpoint/openoffice-impress/keynote, where I explaing programs, pseudocodes, etc. Recently I was thinking about creating text-only, code-only and pseudocode-only slides with beamer and then exporting them somehow to powerpoint where I modify them to add figures or some minor details for polishing the presentation, which are usually hard to do with beamer. I googled a bit around and found that beamer can export to PDF or PS but not to powerpoint. I wonder anyway if you know some possibility of conversion from beamer to on-screen editable powerpoint/openoffice-impress/keynote.

7

10 Answers 10

17

"beamer can export to PDF or PS", beamer doesn't export anything. It is a LaTeX class and LaTeX compiles the document to PDF (pdflatex) or DVI (latex) which then is mostly converted to PS. There is of course no powerpointlatex, so you will need to convert the PDF or PS somehow to a format PP can read, which would be RTF (Rich Text Format) or some Windows vector format like EMF or WMF. However, I would do it either with one or the other software. They do not mix well.

9

Here some free solutions for Beamer to PPT/Impress conversion - after testing a lot of things (Python scripts, pandoc, conversion to HTML or RTF before PPT, etc.):

  1. From PDF with LibreOffice (referred to hereafter as "LibreOffice method"): best finish but less easy to edit.
  2. From '.tex' with pandoc (referred to hereafter as "Pandoc method"): workable but less finish.
  3. NON editable from PDF (one image per slide, so exact match with the PDF):

Content

  1. Solutions comparison
  2. LibreOffice method
    2.1. Approach No. 1: One step command line
    2.2. Approach No. 2: Manual method
    2.3. Results
    2.4. Issues
  3. Pandoc method
    3.1. Method description
    3.2. Results
    3.3. Issues and workarounds
    3.4. Results with improved code for PPT conversion
  4. '.tex' example code
    4.1. Code for the fisrt example (§2.3. & §3.2.)
    4.2. Adapted code for better Pandoc conversion (§3.4.)
  5. Additional materials to generate the custom-reference.pptx template
  6. Other solutions & Related posts

1. Method comparison

Method Pro Cons
LibreOffice Good template conversion The navigation symbols on foot right corner are not removed
Full automation from '.tex' to 'PPT' Not full automation from '.tex' to 'PPTX'
Fully Editable 'PPT' file editable with one text box for each line and each character in equation which could be cumbersome if someone wants to really "work" with the PPT
Some equation are not well converted
Pandoc Full automation from 'tex' to 'PPTX' No perfect template conversion (but perfectible thanks to customizable template)
Fully editable and easy to work with No glossary
Biblio OK No customizable display of references
Quite good equation conversion No TOC
Some workarounds could be find in the '.tex' code to improve the conversion (thus, this method is more flexible than the LibreOffice method)
NON editable from PDF (one image/slide) Exact match with the PDF (no font difference, conversion issues, etc.) Non editable

2. LibreOffice method

This method uses soffice (as mentioned by user202729) and makes it possible to obtain a relatively faithful conversion (quite good template conversion) and fully editable (but not very practical to really work on the PPT, see §1. above and §2.4. below).

Completely automatable - form '.tex' to 'PPT' - on linux or on a Windows Subsystem for Linux (WSL) and probably on Windows.

This method is declined in two approaches:
1. Inline method (one step from PDF to PPT).
2. Manual method (several steps). For each step, the corresponding inline command is also given (when possible).

Two approaches (One result):

2.1. Approach 1: One step command line

One step method from PDF to PPT on Linux terminal (thanks to this ask.libreoffice.org answer):

soffice --infilter=impress_pdf_import --convert-to ppt filetoconvert.pdf for PPT conversion

soffice --infilter=impress_pdf_import --convert-to odp filetoconvert.pdf for impress conversion

After, open with Power Point software in order to convert from PPT into PPTX if needed...

2.2. Approach 2: : Manual method

  1. First, open the PDF with LibreOffice Impress and save it in ODG format (LibreOffice Draw) because Impress will actually redirect to Draw after opening the PDF... On Linux terminal: libreoffice --headless --convert-to odg filetoconvert.pdf

OR force Impress to open the PDF by selecting this file type in the open file screen Ctrl-o: "PDF – Portable Document Format (Impress) (*.pdf)" details here. Then, you can skip step no. 2 below.

  1. Second, convert the Draw (ODG) file to an LibreOffice Impress (ODP) file (only possible with unoconv command line). On Linux terminal: unoconv -f odp filetoconvert.odg

  2. Third, open the ODP file with OpenOffice Impress (and not LibreOffice Impress) and do "Save As" in "Power Point 97-2003" format. On Linux terminal (thanks to this answer): soffice --infilter=impress8 --convert-to ppt filetoconvert.odp

  3. Fourth, open with Power Point software in order to convert from PPT into PPTX if needed

2.3. Results

With this Beamer "generated" PDF:

It gives the following PPT:

Note that some slides look relatively the same as the PDF.

2.4. Issues

  • The navigation symbols on foot right corner are not removed.
  • Gradation of blues not well converted in the header.
  • TOC bullet not well converted.
  • Equations not well converted (square root, sum) and a lot of brackets () are missing (e.g. after abs function).
  • Extra space after \verb command sometimes.
  • Table vertical lines not perfectly vertical.
  • Here a picture showing the text boxes in the PPT (one text box for each line and each character/string in equation). Note that not all the text boxes are selected in the picture below, just some of them to give an idea:

3. Pandoc method

As mentioned by Psychonaut and Seamus in comment, pandoc can be used for '.tex' to DOCX/PPTX conversion with the recent possibility of using a customized DOCX/PPTX template.

3.1. Method description

  1. First, generate a template file (called custom-reference.pptx in this example) with (also works with DOCX, see details here):

pandoc --print-default-data-file reference.docx > custom-reference.docx

  1. Second customize your template manually by open it with PowerPoint software. You can change a lot of things like slide size, color theme and also header and footer with the "Slide Master" view (be careful in some MSOffice version you can have bad conversion of picture you put in the header and/or footer with the "Slide Master" view. A workaround is to insert the pictures into "shapes": a rectangle for example, by filling it with the picture you want).

  2. Third, convert your '.tex' file (called main.tex in this example) into PPTX with Pandoc (as you can see, you can specify a bibliography file with --bibliography=mybib.bib):

pandoc main.tex --reference-doc=custom-reference.pptx --bibliography=mybib.bib --pdf-engine=lualatex -o main.pptx

The conversion is far from prefect (strange behavior of section title, equations, pictures, no glossary) but the PPT is fully editable and more practicable to work with than with the LibreOffice method and it's more possible to find a workaround in the '.tex' code when something is not well converted.

3.2. Result

With the same Beamer example presented in section 2.3. (see '.tex' code in section 4.1.), one can obtain the following PPT.

Note that you need to create the image called "example-image.png" because pandoc will not find it (as LaTex does) from graphicx package. Also, you need to modify the custom-reference.pptx template (with the Slide Master view) in order to get the same PPT as below: create the appropriate shapes in the "Title Slide", change the header/footer picture on background (see §6. giving picture of header/footer in order to reproduce the output given here) and also the size of the font in text boxes - set to '12+'' in the example below on "Title and Content Slides" or 28 and 20 for title and subtitle in the "Title Slide":

Note that reference citations and footnote are quite well converted as well as equations, gls command, verbatim, table, picture and also "simple" SIunitx commands.

3.3. Issues and workarounds

Section §4.2. will present an improved code tacking into account some of the workarounds shown below in order to obtain a better pandoc conversion.

Issue Workaround(s)
No TOC displayed and no "TOC" title on header
Frametitle title alone on separated slide or on top of slide (see Equations slide) (i) Redefine frame enviroment to ignore the title argument OR (ii) Use \frametitle command and redefine it to display nothing
No "progression bullet coloration" on header
Citation display modified
Table caption apears on bottom
No figure side by side with subfigure but on different slide (and the next slide has no title)
No tikzpicture display (i) Use Lua filter OR (ii) pandocfilters OR (iii) First convert the tikzpicture to image see standalone package and include it as a picture with \includestandalone. Second, redefine the \includestandalone to become the \includegraphics command
Figure size changed
No glossary (but gls command works)
Ref. Bib. list style modified
Footnotes at the end of the document (but hyperlink works)

3.4. Result with adapted MWE

4. '.tex' example code

4.1. Code for the first example (§2.3. & §3.2.)

\documentclass{beamer}
\usetheme{Warsaw}% Theme of the presentation
\useoutertheme{miniframes}% Display the contents in header in minimal form
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{siunitx}
\usepackage{verbatim}
\usepackage{standalone}
\usepackage{biblatex}
\addbibresource{mybib.bib}% File containing the bibliographies entries
\usepackage{glossaries}
\makenoidxglossaries


\newglossaryentry{LATEX}
{
    name={\LaTeX},
    description={LaTeX is to a book what a set of blueprints is to a building \cite{Dul13}}
}

\title[A short title]{A  very very very very long title to see if some text overlaping occrus when converting this \gls{LATEX} Beamer file.}
\subtitle{This is a PDF test for Beamer to PPT conversion}
\author{Me}
\date{\today}

\begin{document}

\begin{frame}
    \titlepage
\end{frame}

\begin{frame}{TOC}
    \tableofcontents
\end{frame}

\section{Equations}
\begin{frame}[fragile]{Equations}\small
         \begin{subequations}
            \begin{align}
                {ErrIm}(i) =  \frac{abs \left( Im_{Ny_1}(i) - Im_{Ny_2}(i) \right)}{\frac{ max \left( abs \left( Im_{Ny_1} \right) \right) + max \left( abs \left( Im_{Ny_2} \right) \right) }{2}} \times 100 \\
                S =  \sqrt{\frac{1}{N-1}\sum_{i=1}^{N} \lvert  A(i) - \mu \rvert ^2}
            \end{align}
            \end{subequations}
        Two inline math expression (\verb§$e=mc^2$§ ; \verb§$\lambda_g=2$§)\footnote{\textit{verb} is well converted!} $e=mc^2$ ; $\lambda_g=\num{2}$ inserted into some text.

        A citation (\verb§\cite{Dul13}§): \cite{Dul13}.

        Two SI unitx quantity (\verb§\SI{0}{\degreeCelsius}§ ; \verb§\SI{1}{\kilogram}§): \SI{0}{\degreeCelsius} ; \SI{1}{\kilogram}.
\end{frame}

\section{Table}
\begin{frame}{Table}
     \begin{table}
        \caption{A table caption.}
        \begin{tabular}{|c|c|}
            \hline
            01A&01B\\02A&02B\\03A&03B\\04A&04B\\05A&05B\\
            \hline
        \end{tabular}
     \end{table}
\end{frame}

\section{Picture \& Tikzpicture}
\begin{frame}{Picture \& Tikzpicture}
    \begin{figure}
    \begin{subfigure}{0.45\textwidth}
        \centering
        \includegraphics[width=\textwidth]{example-image.png}
        \caption{A figure caption.}
    \end{subfigure}
    \begin{subfigure}{0.45\textwidth}
        \centering
        \begin{tikzpicture}[scale=0.7]
            \node[draw] at (0,0)  (Nod1) {A node};%
            \node[draw] at (2,2)  (Nod2) {Another node};%
            \draw (Nod1) -- (Nod2);%
        \end{tikzpicture}
        \includestandalone{GenerateTikzpictureImage}
        \caption{A tikz picture caption.}
    \end{subfigure}
    \end{figure}
\end{frame}


\begin{frame}{Glossary}
    \printnoidxglossary[title=Glossary]
\end{frame}

\begin{frame}{Bib}
    \frametitle{Bibliographic References}
    \printbibliography[title=Bib,heading=bibnumbered]
\end{frame}

\end{document}

4.2. Adapted code for better Pandoc conversion (§3.4.).

There is two differences between the original code example presented in §4.1.:

  1. The file 'myPandocConversionPreambule.tex' is loaded in preambule. Note that the code in this file is not written for standard LaTeX compilation (with pdfLaTeX, LuaLaTeX, XeLaTeX, etc.) but only for pandoc conversion.
    The file 'myPandocConversionPreambule.tex' does two things:
    • Redefine the frame environement in order to not use the frametitle argument to avoid the display of the frametitle at the beginning of each slides (see Issues in §3.3.).
    • Redefine the \includestandalone to \includegraphics command in order to include the previously genereted tikzpicture as an image because pandoc doesn't directly convert Tikzpicture (see Issues in §3.3.).
  2. The tikzpicture is now generated by an external '.tex' file called GenerateTikzpictureImage. Thus, the tikzpicture is now inserted with \includestandalone{GenerateTikzpictureImage} (which will be redefine as \includegraphics by 'myPandocConversionPreambule.tex' - only for pandoc conversion). This file needs to be compiled once before pandoc conversion in order to convert the tikzpicture into a png image.
\documentclass{beamer}
\usetheme{Warsaw}% Theme of the presentation
\useoutertheme{miniframes}% Display the contents in header in minimal form
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{siunitx}
\usepackage{verbatim}
\usepackage{standalone}
\usepackage{biblatex}
\addbibresource{mybib.bib}% File containing the bibliographies entries
\usepackage{glossaries}
\makenoidxglossaries


\newglossaryentry{LATEX}
{
    name={\LaTeX},
    description={LaTeX is to a book what a set of blueprints is to a building \cite{Dul13}}
}

\title[A short title]{A  very very very very long title to see if some text overlapping occurs when converting this \gls{LATEX} Beamer file.}
\subtitle{This is a PDF test for Beamer to PPT conversion}
\author{Me}
\date{\today}

\begin{filecontents*}{myPandocConversionPreambule.tex}
    % Redefine frame env in order to not use the frametitle argument
    \let\oldFrame\frame
    \let\endOldFrame\endframe
    \renewenvironment{frame}[1][]
    {\oldFrame}
    {\endOldFrame}

    % Redefine the `\includestandalone` to become the `\includegraphics` command in order to include the previously generated Tikzpicture as an image
    \renewcommand{\includestandalone}[1]{\includegraphics[width=\textwidth]{#1.png}}
\end{filecontents*}

\begin{document}

\begin{frame}
    \titlepage
\end{frame}

\begin{frame}{TOC}
    \tableofcontents
\end{frame}

\section{Equations}
\begin{frame}[fragile]{Equations}\small
         \begin{subequations}
            \begin{align}
                {ErrIm}(i) =  \frac{abs \left( Im_{Ny_1}(i) - Im_{Ny_2}(i) \right)}{\frac{ max \left( abs \left( Im_{Ny_1} \right) \right) + max \left( abs \left( Im_{Ny_2} \right) \right) }{2}} \times 100 \\
                S =  \sqrt{\frac{1}{N-1}\sum_{i=1}^{N} \lvert  A(i) - \mu \rvert ^2}
            \end{align}
            \end{subequations}
        Two inline math expression (\verb§$e=mc^2$§ ; \verb§$\lambda_g=2$§)\footnote{\textit{verb} is well converted!} $e=mc^2$ ; $\lambda_g=\num{2}$ inserted into some text.

        A citation (\verb§\cite{Dul13}§): \cite{Dul13}.

        Two SI unitx quantity (\verb§\SI{0}{\degreeCelsius}§ ; \verb§\SI{1}{\kilogram}§): \SI{0}{\degreeCelsius} ; \SI{1}{\kilogram}.
\end{frame}

\section{Table}
\begin{frame}{Table}
     \begin{table}
        \caption{A table caption.}
        \begin{tabular}{|c|c|}
            \hline
            01A&01B\\02A&02B\\03A&03B\\04A&04B\\05A&05B\\
            \hline
        \end{tabular}
     \end{table}
\end{frame}

\section{Picture \& Tikzpicture}
\begin{frame}{Picture \& Tikzpicture}
    \begin{figure}
    \begin{subfigure}{0.45\textwidth}
        \centering
        \includegraphics[width=\textwidth]{example-image.png}
        \caption{A figure caption.}
    \end{subfigure}
    \begin{subfigure}{0.45\textwidth}
        \centering
    % The Tikzfigure is generated with a separated 'tex' standalone text file and included here:
        \includestandalone{GenerateTikzpictureImage}
        \caption{A tikz picture caption.}
    \end{subfigure}
    \end{figure}
\end{frame}


\begin{frame}{Glossary}
    \printnoidxglossary[title=Glossary]
\end{frame}

\begin{frame}{Bib}
    \frametitle{Bibliographic References}
    \printbibliography[title=Bib,heading=bibnumbered]
\end{frame}

\end{document}

The content of the GenerateTikzpictureImage '.tex' file:

\documentclass[convert]{standalone}% Need the -shell-escape compiler option
\usepackage{tikz}

\begin{document}
    \begin{tikzpicture}[scale=0.7]
        \node[draw] at (0,0)  (Nod1) {A node};%
        \node[draw] at (2,2)  (Nod2) {Another node};%
        \draw (Nod1) -- (Nod2);%
    \end{tikzpicture}
\end{document}

5. Additional materials to generate the custom-reference.pptx template

Below the header/footer background that you can use in the "Slide Master View" of PowerPoint software in order to reproduce the examples given above:

enter image description here

"Title Slide":

enter image description here

Below the example-image from the graphicx package:

6. Other solutions & Related posts

The following table summarize some solutions for Beamer/PDF to PowerPoint (some links thanks to user202729's comment).

Legend : PP = PowerPoint
TBD = To be determined

# Source Conversion Editable Automatable Insight Question Link
1 bloodworks' answer '.tex'->PPT Partially (text) No use htlatex to extract text and imagemagick to convert the PDF (without text) into image and faithfuler insert it to PP. Beamer-Generated slides to PPT? [duplicate]
2 philosodad's answer PDF->PPT Yes No with LibreOffice (manually with the software GUI): same result as LibreOffice method (§2). //
3 Martin's answer (duplicate of Martin's answer here) '.tex'->PPT Partially (text) Yes use a "small python script", result partially editable (text), equations as images, no layout conservation. //
4 ArTourter's comment PDF->MSWord TBD TBD with "Adobe Acrobat Standard (or above)". //
5 AJN's comment PDF->PPT No TBD first convert your PDF in image files (with imagemagick for e.g.) and use the Insert->PhotoAlbum of PP, (apparently not available on MacOS PP) more details here (also possible with LibreOffice Impress as mentioned by Jos in comment: Insert->Image->Photo Album - more details here). Convert beamer presentation to (non-editable) powerpoint [closed]
6 Matthew Leingang's answer PDF->PPT No No use PDF2Keynote and after Keynote to save as PP (pgfpages is used to deal with custom margin). How should I convert my beamer slides to PowerPoint according to these odd specifications?
7 Steve Rindsberg's answer '.tex'->PPT Partially (text) No first convert the '.tex' file into "ascii text" and after import it with PP. Export beamer slides to powerpoint editable format [closed] (stackoverflow)
8=5 rindPHI's answer PDF->PPT No TBD use GhostScript to convert the PDF into images and then insert the images into OpenOffice/LibreOffice (with the Photo Album plugin Insert->Image->Photo Album - details also here). How to convert PDF to PPT or ODP? (superuser)
9 BBlake's answer PDF->PPT No TBD mention several online converters from PDF to PPT. For e.g. PDFPowerpoint which permit to convert a PDF without login in (thanks to Josir's comment) //
10=5 Greg Ramey's answer PDF->PPT No TBD use use imagemagick (options given by macieksk's comment to obtain good image resolution/quality) to convert the PDF and after insert the images into Impress (with the Photo Album plugin Insert->Image->Photo Album). Is there any tool to convert pdf to ppt/odp slides in Linux/ Ubuntu offline? (askubuntu)
11 Digger's answer PDF->PPT Yes TBD uses directly LibreOffice Impress to open the PDF and force Impress to not redirect to LibreOffice Draw when opening the PDF (from here). //
12=5 hanxue's answer PDF->PPT No TBD use first imagemagick (or GhostScript) and use the Insert->PhotoAlbum of PP (apparently not available on MacOS as mentionned by hanxue's comment). Converting PDF to Powerpoint, importing each slide as a singular picture (apple.stackexchange)
13 Teddy van Jerry's comment PDF->PPT No Yes "the beamer [PDF] is converted to high-quality images" Produce a pptx or keynote file from a beamer presentation [duplicate]

Related

1
  • This answer has been set to Community wiki in order to be easily editable. So, please don't hesitate to improve it, for e.g. add other methods, add issues and associated workarrounds, improve the pro/cons table, improve the english ;), etc.
    – zetyty
    Commented May 19, 2023 at 7:55
7

I have a partial solution for exporting beamer slides to PowerPoint

Purpose: If you want to create your background, header, and footer in (Xe)Latex, like this: example header

but you still would like to edit the content in PowerPoint (or whatever you have), you could use this solution.

For this you will need a Mac with OS X (Automator and AppleScript needed). I followed the following procedure:

  1. Compile Beamer Slides to PDF
  2. Use Automator to each page of PDF into separate PDF Files Automator Workflow
  3. Use AppleScript to add each separate PDF file into an individual slide (see below NOTE: original code from http://macscripter.net/viewtopic.php?pid=152809#p152809)
tell application "Finder" 
     set picFolder to every file in folder (choose folder)
     log (count picFolder)
     sort picFolder by name end
tell


tell application "Microsoft PowerPoint"
--activate
    make new slide at end of active presentation with properties {layout:slide layout blank}
    set numberofslides to (count of slides of active presentation) as integer     >         set theIncrementValue to 1 as integer
    repeat numberofslides times
         set picName to item theIncrementValue of picFolder as string         >              set properties of slide theIncrementValue of active presentation to {layout:slide layout text slide, follow master background:true}
     set myPic to make new picture at slide theIncrementValue of active presentation with properties {file name:(picName as text), top:0, left position:0, height:540, width:722,lock aspect ratio:true, save with document:true} --makes pictures full sized
         z order myPic z order position send shape to back--tip from Ben Waldie
         set theIncrementValue to theIncrementValue + 1
  end repeat
end tell

UPDATE 2: Ben Waldie helped me move the picture (beamer slides/individual pdf "images") to the back, such that the beamer slides do not cover an text boxes in Powerpoint.

Practical Usage: Create your presentation in Powerpoint, using text-only slides (titles in your tex code) or title-text slides (titles not included in tex code). You will have to coordinate the orientation of these text fields and your pdf slides, such that it is aesthetically pleasing. In your TeX editor, add the number of frames you have in powerpoint.


My original post (which is most likely obsolete):

I have a possible solution for you:

PDF-to-Powerpoint

It is not free, $12.95 at the moment. This should do what you want. I will continue to seek an open-source alternative. I would really like to be able to have latex generated templates for my Keynote presentations. I especially want the ability to have something like the following picture, except I would want to use it as a template background for my slides in Keynote. All bullet points, pictures, and videos would be added from within Keynote. In essence, Xe(LateX) becomes just a template creator. Have a look, paying attention to what I call the "slide guide" in the header:

Example of (Xe)LateX Export with beamer class

7

Here (https://github.com/martinGithub/beamer2pptx) is a small python script that extracts elements of the beamer using regular expressions, creates an image for each equation and generates a powerpoint with the same number of slides with the equations and the images. It does not keep the layout, but it can help as a first step before reediting the exported presentation in powerpoint.

1
6

One mornign I was bored, and I wrote a small script named pdf2oo. The obtained presentation is not editable (but it is obviously overlayable) and the worse, it's bitmap. Today, it would be possible to add vector graphics easily using svg, but I never found the motivation to do that. It's open source software so you could consider modifying the script to your needs or improving it.

http://pdf2oo.sourceforge.net

4

PDF to Keynote does exactly this. (At least for Keynote)

http://www.cs.hmc.edu/~oneill/freesoftware/pdftokeynote.html

And it's free!

1
  • 1
    I use this all the time (for Keynote's presenter mode), but it should be pointed out that the result is not editable. One can, of course, add additional Keynote elements, but each page of the pdf is simply place into Keynote as a full-slide image. It looks great though.
    – erik
    Commented Mar 27, 2016 at 18:31
3

This answer essentially embed each PDF page as a PowerPoint image (similar in spirit to the pdf2oo answer).

convert -density 200 input.pdf tmp.pdf
soffice --infilter=impress_pdf_import --convert-to pptx tmp.pdf

Assuming original file is input.pdf this will generate tmp.pptx. The second line is taken from https://tex.stackexchange.com/a/633247/250119.

Unfortunately, this does not make the text editable (for my purpose it isn't necessary. Technically it's still "editable" in the sense that you can add new text box on top of it and/or delete certain parts), but the advantage is that there's no imprecision (misplaced formula, missing font ⟹ text get broken at wrong places, etc.) issues.


To convert it to vector graphic instead (warning: the generated file loads extremely slowly) you can do:

gs -o tmp.pdf -dNoOutputFonts -sDEVICE=pdfwrite input.pdf 
soffice --infilter=impress_pdf_import --convert-to pptx tmp.pdf 

Use method from https://tex.stackexchange.com/a/561693/250119 to convert all fonts into "paths" before converting to PowerPoint.

Assuming original file is input.pdf this will generate tmp.pptx.


Remark: Using svg appears difficult. I tried using python-pptx but from the discussion it appears that inserting svg into pptx is difficult https://stackoverflow.com/questions/71046000/python-to-powerpoint-export-svg-to-a-pptx-file / https://github.com/scanny/python-pptx/issues/394

2

Since Beamer's output is a PDF, there are several free online PDF-to-PPT converters out there. I have just used Adobe's: https://www.adobe.com/acrobat/online/pdf-to-ppt.html and I have finally made it. Good luck!

2
  • 1
    The Adobe web tool worked well for me. Just for completeness (and in case someone is concerned about converting slides online), it's worth noting that Adobe Acrobat Pro has an Export To -> Microsoft PowerPoint Presentation menu option that seems to work just as well as the web option and the files remain local to your computer.
    – Omar Wasow
    Commented Apr 20, 2022 at 15:53
  • 1
    Note that this option will change the font of text in the slides as well as possibly introduce some imprecision issues.
    – user202729
    Commented Nov 18, 2022 at 2:39
2

The solutions from previous answers didn't work for me, either because they can't produce editable presentations, or because they're not available for my operating system, or because they choke on certain LaTeX markup. For cases where I just need to extract the presentation text, and maybe preserve some very basic formatting (bold, italic, quotations, bulleted lists, etc.), I've found the least-worst solution is to use Pandoc and then manually post-edit the output. This still saves considerable time over manually retyping the entire presentation.

While Pandoc doesn't do a good job when converting Beamer LaTeX documents directly to a presentation format such as PPTX, it does work fairly well when converting them to OpenDocument text (ODT) documents:

pandoc my_presentation.tex -o my_presentation.odt

The resulting file can be opened in a word processor, and the contents can be copied and pasted into individual slides of a presentation.

1

On Windows 10, I first used Adobe Acrobat to convert the .pdf to images, and then used LibreOffice to merge the images into a .pptx as backgrounds. This method produced visually identical results to the original slides, but the text could not be edited directly. The advangages of the method is that you can easily add common components of PowerPoint such as gifs and shapes.

  1. Open the .pdf file by Adobe Acrobat. Edit the text here (Once converted into images, the text cannot be modified). Select FileExport ToImagePNG. Click the setting and choose a resolution as large as you like, e.g. 600 pixels/inch. Save these .png images into a directory.

  2. In LibreOffice, click FileNewPresentation to create an empty presentation. Then click ToolMarcoOrganize MarcoBasicNew to create a new marco. Fill in the marco with the following code (see details in Fill the background of a presentation file with pics via commandline), where the number of loops and the path of .png images in Test1 should be modified accordingly.

Sub InsertSlideWithBackgroundImage(imageFilePath)
    imageFileURL = ConvertToURL(imageFilePath)
    oDoc = ThisComponent
    oBackground = oDoc.createInstance("com.sun.star.drawing.Background")
    oBitmaps = ThisComponent.createInstance( "com.sun.star.drawing.BitmapTable")
    iBitmap = 1
    Do
        sBitmapName = "bk" & iBitmap
        iBitmap = iBitmap + 1
    Loop Until Not oBitmaps.hasByName(sBitmapName)
    oBitmaps.insertByName(sBitmapName, imageFileURL)
    oBackground.FillStyle = com.sun.star.drawing.FillStyle.BITMAP
    oBackground.FillBitmap = oBitmaps.getByName(sBitmapName)
    oBackground.FillBitmapMode =  com.sun.star.drawing.BitmapMode.STRETCH
    oSlideList = oDoc.getDrawPages()
    oSlide = oSlideList.insertNewByIndex(oSlideList.Count)
    oSlide.Background = oBackground
End Sub

Sub Test1
    For i = 1 To 20
        If i< 10 Then
            Call InsertSlideWithBackgroundImage("D:/temp/slides_Page_0" & i &  ".png")
        Else
            Call InsertSlideWithBackgroundImage("D:/temp/slides_Page_" & i &  ".png")
        End If
    Next
End Sub
  1. Run the marco Test1. Save the resulting file as .pptx.Then you get an identical but uneditable powerpoint.
2
  • Thanks for sharing but I don’t fully understand what this solution provide at the end: a pptx with an image on each slide?
    – zetyty
    Commented May 19, 2023 at 20:16
  • 1
    @SylvainRigal In the final output pptx, there are no objects to choose from, the images are presented as backgrounds.
    – Carlos
    Commented May 24, 2023 at 0:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .