How to use a subset of a beamer presentation?

I am trying to take the PDF output of a beamer presentation and take only a subset of the slides, and create a PDF file out of them (I can't recompile the beamer presentation with the relevant slides, since they are annotated).

When I use:

\documentclass{article}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages=1-15]{presentation.pdf}
\end{document}


The pages are enlarged, and the pdf slides are not the usual size of a beamer presentation slide.

If I change document class to beamer, all pages appear blank.

How can I fix that?

• You can just use a tool to extract the pages you want or remove the ones you don't directly from the PDF. Preview in Mac OS X lets you do that. So does pdftk. – lhf Jan 30 '15 at 15:41

If you know how big your presentation slides are do

\documentclass{article}
\usepackage[paperheight=197mm,paperwidth=254mm]{geometry}
\usepackage{pdfpages}

\begin{document}
\includepdf[pages=1-15]{presentation.pdf}
\end{document}


If you use beamer documentclass, you don't even have to know the size of the slides, just exchange the default white background with a transparent one to make the slides visible:

\documentclass{beamer}
\usepackage{pdfpages}

\setbeamercolor{background canvas}{bg=}

\begin{document}
\includepdf[pages=1-15]{presentation.pdf}
\end{document}


For testing purposes, said that the original presentation is xxx.pdf generated from:

\documentclass{beamer}
\usepackage{lipsum}
\title{Non Source Presentation}
\author{Someone}
\usetheme{Berkeley}
\begin{document}
\maketitle
\section{Lore}  \begin{frame}{Lore ipsum}     \lipsum[1] \end{frame}
\section{Ipsum} \begin{frame}{Nam dui ligula} \lipsum[2] \end{frame}
\end{document}


Then, in your new presentation, to include only the slides 1 and 4 from xxx.pdf, you can simply insert each PDF page as images:

\documentclass{beamer}
\setbeamersize{text margin left=0pt,text margin right=0pt}
\begin{document}
\frame{\includegraphics[page=1,width=\textwidth]{xxx.pdf}}
\frame{\includegraphics[page=4,width=\textwidth]{xxx.pdf}}
\end{document}


Result: