# PDFpages landscape with normal footer and header (on top)

I want to use the pdfpages in Latex in landscape mode.

That's possible with the following code:

\documentclass{article}
\usepackage{pdfpages}
\begin{document}
\includepdf[landscape=true,pages=1-3,pagecommand={}]{Planning.pdf}
\end{document}


But I also want to keep the section and page number at the top and bottom of the page. For example when I do this:

\documentclass{article}
\usepackage{pdfpages}
\begin{document}
\includepdf[landscape=true,pages=1-3,pagecommand={\subsection{Bijlage 1}}]{Planning.pdf}
\end{document}


The header is also rotated, including the footer.

Is it possible to get the header and footer at the 'normal' position (so at the top and bottom of the document, like in portrait mode).

Edit: It looks like my question isn't good explained. So I draw something on paper to clarify my question.

• Welcome to TeX.sx! Please take the time to add a full MWE (minimal working example), that is a compilable (with documentclass and such) document illustrating the problem, so that people willing to help are given all the elements they might need. – T. Verron Nov 8 '16 at 13:33
• I added a small example. – koenieee Nov 8 '16 at 13:38
• Welcome to TeX.SX! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). – ebosi Nov 8 '16 at 13:40
• Untried solution: is the option pagecommand={\thispagestyle{headings}} working? – ebosi Nov 8 '16 at 13:44
• @ebo, thanks I was wondering how I could get the syntax highlighting on. – koenieee Nov 8 '16 at 13:53

You can have a try with following MWEs:

• portrait-pdf.tex : the portrait file that will be included via pdfpages

\documentclass{scrartcl}
\usepackage{graphicx}
\begin{document}
\centering
\includegraphics*[width=.9\textwidth,height=.9\textheight]{example-image-a}
\includegraphics*[width=.9\textwidth,height=.9\textheight]{example-image-b}
\end{document}


You get this result:

• landscape-pdf.tex : the landscape file that will be included via pdfpages

\documentclass[landscape]{scrartcl}
\usepackage{graphicx}
\begin{document}
\centering
\includegraphics*[width=.9\textwidth,height=.9\textheight]{example-image-c}
\includegraphics*[width=.9\textwidth,height=.9\textheight]{example-image}
\end{document}


You get this result:

• main.pdf: the file that includes previously generated PDF

\documentclass{scrartcl}
\usepackage{pdfpages}
\usepackage{pdflscape}
\usepackage{lipsum}
\begin{document}
\section{Regular text}
\lipsum

\begin{landscape}
\includepdf[landscape=true,pages=1-2,pagecommand={\section{Include lanscape pdf}}]{landscape-pdf}
\end{landscape}

\includepdf[landscape=false,pages=1-2,pagecommand={\section{Include portrait pdf}}]{portrait-pdf}
\end{document}


The only issue is that on page 3 and 4 of this PDF, pages number are "on the left side": see explanations and details here.

• Thank you for trying to answer my question, but I think you didn't understand it. I added a drawing on paper to clarify my question. – koenieee Dec 1 '16 at 11:03
• @koenieee thanks for pinging. Could you please draw the boundaries of your included landscpape pdf on your drawing, as well as how is text written in this document (horizontally, or vertically) - so that I'm sure I understand it correctly? – ebosi Dec 1 '16 at 11:17
• @koenieee plus: does "title" belong to the imported PDF, or the one you're trying to create? and are your PDF more than 1 page long? – ebosi Dec 1 '16 at 11:27
• Title doesn't beolong to the imported PDF, and yes the PDF is more than 1 page long. Only at the first page the title has to be visible (imported PDF), at the second page (PDF) only the page numbers has to be visible. – koenieee Dec 7 '16 at 10:23
• @koenieee is the proposed solution satisfactory? – ebosi Dec 7 '16 at 10:48