\includepdf jumps to new page - can I avoid that? [duplicate]

For my thesis I shall include some pdf-files in the appendix (i.e. appendix a, b, c etc.). I would like the section title (Appendix of Introduction) and the subsection title (Appendix a: Initial presentation of the project) to be at the top of the page on which the first page of the multi-paged pdf-file start.

First I was doing:

\pagebreak

\section*{Appendix of Introduction}

\subsection*{Appendix a: Initial presentation of the project}

\includepdf[pages={ - },scale=0.8,pagecommand={\thispagestyle{plain}}] {appendix/Initial-presentation-of-the-project.pdf}


That gave me one page with the two titles at the top and the included pdf-file starts on the following page.

After being directed to this thread: How to include PDF pages without a newpage before the first page? I figured out how to get the title of the subsection on the same page as the included pdf-file, but now the subsection title is on all the pages of the included multi-page pdf-file:

\pagebreak

\section*{Appendix of Introduction}

\includepdf[pages={ - },scale=0.8,pagecommand=\subsection{Appendix a: Initial presentation of the project}] {appendix/Initial-presentation-of-the-project.pdf}


I need to figure out how to have the title of the subsection only on the first page of the appendix (a).

Furthermore, the problem of how to get the title of the section on that same page remains as well.

marked as duplicate by GuM, Phelype Oleinik, Paul Gaborit, Kurt, SebastianoJul 10 '18 at 19:16

• Have you tried adjusting the scale to be lower (like 0.7 or 0.6) for the first page? – Flexo013 Jul 10 '18 at 7:52
• Have you tried adjusting the scale to be lower (like 0.7 or 0.6) for the first page? I have now, but it made no difference. Thanks for the suggestion. I'll look at that other thread. – jbahn Jul 10 '18 at 8:17
• @flex013: that other thread was a good one. I now have the title of the subsection on the first page of the included multi-page pdf-file. As I have a number of appendices, next step is to figure out how to have the title of the section on the first page of the first included pdf-file... – jbahn Jul 10 '18 at 8:26

If the PDF is only one page, you can treat it like a figure or image file:

\pagebreak

\section*{Appendix of Introduction}

\subsection*{Appendix a: Initial presentation of the project}

\newline
\begin{center} %centre on page
\resizebox{0.8 \textwidth}{!}{ %resize inserted page
\includegraphics{{"appendix/Initial-presentation-of-the-project.pdf"}}
} %close resizebox
\end{center}


You can also use options to resize graphics (\includegraphics[width=16cm]{{"appendix/Initial-presentation-of-the-project.pdf"}}) but resizebox will scale to the size of your page. This also works to include vector images in documents or beamer presentations.

Remember to include \usepackage{graphicx} in your document header.

• Thanks for the advise, but I should have explained that it is a multi-page pdf-file. – jbahn Jul 10 '18 at 8:20
• In that case, this command will include the first page with section headings. \includepdf[pages=2-last, scale=0.8] should fill in the rest. – Tom Kelly Jul 10 '18 at 8:33
• I tried your fix and it almost works. It does pose some new problems though. I created a new thread: tex.stackexchange.com/questions/440046/… – jbahn Jul 10 '18 at 12:46
• Btw, \includegraphics did not accept pages=2-last but did accept pages={2- }. – jbahn Jul 10 '18 at 12:47
• Sorry, I suspected that issue may arise but didn’t have a reproducible MWE to test the code. \includepdf[pages = 2-, width = 0.8 \textwidth] ought to do it then. – Tom Kelly Jul 10 '18 at 12:52