I am using pdfpages
to insert PDFs into a master file. Some of the PDFs are portrait and some are landscape. I am using pagecommand=\thispagestyle{plain}
so that the page numbers are in sequence throughout the final document. However, on PDFs included as landscape, the page numbers appear on the left side of the page (i.e. as they would if the page were not landscape). How can I get them to appear on the bottom of the page?
MWE where one.pdf
is included in portrait and two.pdf
is included in landscape:
\documentclass[12pt,english]{article}
\usepackage{pdfpages}
\includepdfset{pagecommand=\thispagestyle{plain}}
\usepackage{geometry}
\begin{document}
This is the text in the master file.
\newpage{}
\includepdf[pages=-,landscape=false]{one}
\newpage{}
\includepdf[pages=-,landscape=true]{two}
\end{document}
Best Answer
Using
fancyhdr
you can define your own page style and move the page number/counter into the appropriate position.You would then use
pagecommand=\thispagestyle{mylandscape}
. Example output withone.pdf
(1 page portrait) andtwo.pdf
(1 page landscape):two.tex
:one.tex
: