[Tex/LaTex] title of (sub)section on included multi-page pdf

includegraphicspdfpages

This is a follow-up on another thread in which I got advise on how to \includepdf with section and subsection titles on the included pdf: \includepdf jumps to new page – can I avoid that?

The proposed \resizebox + \includegraphics solution does seem to solve the with single-page pdfs. However, with the solution in the above thread, my multi-page pdf is treated as a single-paged, i.e. only the first page is included. As is also suggested, the rest of the pages in the multi-page def-file can afterwards be included by \includepdf[pages={2- }.

Combining these two commands are not very convenient but could be feasible, except the first page is scaled and positioned different from the rest of the pages.

For me, it is quite complex to make a MWE in this case and hence I will (at least for now) just present the code and a snapshot of the output file.

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

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

Please note the different scale values in the code snippet and the different positionss of the boarders on page 35 and 36 in the left side of the output file. The following pages are similar to page 36.

The boarders of pages 35 and 36

After using the latest suggestion by @Tom Kelly, the size issue is solved. The issue with position is not used but has minimised:

enter image description here

Best Answer

\includepdf has a width argument. Use this instead of scale to give the exact width:

\pagebreak

\section*{Appendix of Introduction}

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

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

\includepdf[pages = {2- }, width = \textwidth, pagecommand = {\thispagestyle{plain}}] {appendix/Initial-presentation-of-the-project.pdf}
Related Question