# Section on one page with includepdf [landscape]

I want to include a PDF in landscape (its a table in PDF form) with include PDF. I want a section on the same side, but when I use this command, the section heading is not on top (of that landscape page).

\includepdf[landscape=true, page=1,pagecommand=\section{Section Heading}]{table.pdf}


As you can see. B Section Heading is on the right. But i want it on top.

• Could you provide a image of your current result or desired result? Because compiling your code I get what I'd expect... the section gets rotated with the inserted content. – G. Bay May 18 '18 at 2:00
• i added a picture – ziT May 18 '18 at 5:03

There could be multiple reasons for this. I suspect that \pdfpages still uses the "portrait coordinate system" for pages included in landscape, thus "LaTeX" does not know that you are in landscape mode. You've just rotated the one PDF-page.

If you use e.g. the pdflscape-package to tell LaTeX that you are in landscape mode first, it seems to work fine:

\documentclass{article}
\usepackage{pdflscape}
\usepackage{pdfpages}
\begin{document}
\begin{landscape}
\end{landscape}
\end{document}


Here is a different approach, based on this answer. I have rotated the headings using textblock and rotated the included pdf again.

\documentclass[a4paper]{report}
\usepackage{pdfpages}
\usepackage{pdflscape}
\usepackage{textpos}
\begin{document}
\begin{landscape}
\begin{textblock}{20}(-17,-2.5){\rotatebox{90}{\leftmark}}