This answer attempts to do what you are asking via these steps:
- Use
geometry
to set margins to accommodate the captions and page numbers you want.
- Use
caption
package for its \captionof
and \captionof*
commands to set the captions.
- Use
pdflscape
and wrap landscape pages in landscape
environment to set captions in the proper orientation.
- The example assumes one caption per included document. To do this,
pdfpages
is patched to offer a pagecommand*
option that will allow for a different command to be executed on the first page of included pages. The way I have written things, pagecommand*
is executed on the first page, and pagecommand
is executed on second and subsequent pages (though this could be changed relatively easily if desired). If you desire a different caption for different pages, it will be best to include the document 2 pages at a time (and in this case, the patches are not necessary).
Example Output:
The output that is given provides the page number on all pages (in portrait layout, ideal for printing).



The Code
This code has been commented to give an idea of what was changed where.
\documentclass{scrartcl}
\usepackage{caption} % Use for \captionof(*) command
% Set the page margins to accomodate space for captions and page numbers
\usepackage[left=0.9cm,right=0.9cm,bottom=1cm,footskip=1em,includefoot]{geometry}
% Use for 'landscape' environment to position landscape captions properly
\usepackage{pdflscape}
% Setup the new 'pagecommand*' option key-value
\usepackage{etoolbox}
\usepackage{pdfpages}
\makeatletter
\newcommand*{\AM@pagecommandstar}{}
\define@key{pdfpages}{pagecommand*}{\def\AM@pagecommandstar{#1}}
\patchcmd{\AM@output}{\begingroup\AM@pagecommand\endgroup}
{\ifthenelse{\boolean{AM@firstpage}}{\begingroup\AM@pagecommandstar\endgroup}{\begingroup\AM@pagecommand\endgroup}}{}{} % Patch to use new option
\patchcmd{\AM@split@optionsii}{\equal{pagecommand}{\AM@temp}\or}
{\equal{pagecommand}{\AM@temp}\or\equal{pagecommand*}{\AM@temp}\or}{}{}
\makeatother
\begin{document}
% Include a single PDF page
\includepdf[
frame,
scale=0.90,
% Use new 'pagecommand*' to set caption on the first page, include page #
pagecommand*={\thispagestyle{plain}\null\vfill\captionof{figure}{This is the FIRST caption}}
]{pdfdocument.pdf}
% Include a pdf-document with several pages
\begin{landscape} % Be sure to wrap in 'landscape' environment
\includepdf[
pages=-,
nup=1x2,
frame,
landscape,
delta=5mm 5mm,
scale=0.90,
% Set the caption on the first page of output
pagecommand*={\thispagestyle{plain}\null\vfill\captionof{figure}{This is the SECOND caption}},
% Set the [continued] caption on second and subsequent pages
% Use '\captionof*{...} to avoid duplicate entries in listoffigures
pagecommand={\thispagestyle{plain}\null\vfill\captionof*{figure}{\figurename~\thefigure: This is the SECOND caption (Continued)}}
]{pdfdocument.pdf}
\end{landscape}
\end{document}
pagecommand
and insertheader
orfooter
for each page. If for one page usethispagestyle
macro. Do it for each pdf assuming that they are all one page documents. – user11232 Apr 7 '14 at 11:38