Notes:
Please edit the following for those who know how to add the resumed page numbers for imported beamer
slides.
% this file name is main.tex just for easing our discussion!
\documentclass{article}
% start simulating your situation
\usepackage{filecontents}
% report input file
\begin{filecontents*}{myreport.tex}
\documentclass{article}
\usepackage[a4paper,margin=3cm]{geometry}
\usepackage{blindtext}
\begin{document}
\Blinddocument
\end{document}
\end{filecontents*}
% beamer input file
\begin{filecontents*}{mybeamer.tex}
\documentclass{beamer}
\begin{document}
\begin{frame}{Hello World}
I am the first frame!
\end{frame}
\begin{frame}{Hello Universe}
I am the second frame!
\end{frame}
\end{document}
\end{filecontents*}
\immediate\write18{pdflatex -shell-escape myreport}
\immediate\write18{pdflatex -shell-escape myreport}
\immediate\write18{pdflatex -shell-escape myreport}
\immediate\write18{pdflatex -shell-escape mybeamer}
\immediate\write18{pdflatex -shell-escape mybeamer}
% stop simulating your situation
\usepackage{pdfpages}
\begin{document}
\includepdf[pages=-]{myreport}
\includepdf[pages=-,landscape]{mybeamer}
\end{document}
Demo Scenario:
The codes between % start simulating your situation
and % stop simulating your situation
are intentionally added just for simulating your situation in which you have 2 PDF files.
The codes will produce both files on the fly before merging them. If you want to compile it for a demo (because it does not use your own PDF files), compile it with pdflatex -shell-escape main.tex
.
See the following if you want to use your own PDF files!
Real Scenario:
In your real scenario, please remove the codes between those tags, edit the file names for the following codes
\includepdf[pages=-]{myreport}
\includepdf[pages=-,landscape]{mybeamer}
and compile it with normal usage which does not need -shell-escape
. In other words, your real main input file becomes
% this file name is main.tex just for easing our discussion!
\documentclass{article}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages=-]{myreport}
\includepdf[pages=-,landscape]{mybeamer}
\end{document}
and you need to compile it with pdflatex main.tex
wheere main.tex
is the file name of the main input file to merge your 2 PDF files.
\setcounter{page}{xxx}
and them you can join both pdf files (in linux, usingpdftk
for example). But if you need to do this many times, you can try to usecombine
package.