# remove blank space below section before pdf in latex

I have a little problem with Latex. I wanna add some pdfs to my master thesis and I have a problem that I couldn't find the answer so far.

After the \section, the rest of the page stays empty and the pdf is in the other page. How can I delete this and have the pdf right below the section ?

Thank you !

Here is part of my code:

\chapter{Annexes}

Ce chapitre regroupe les protocoles, les résultats bruts, ainsi que le script R utilisés dans ce travail qui n'ont pas pu être affiché dans les parties précédentes par manque de place et par esthétique.

\section{Protocoles}

\includepdf[scale=0.8,pages={1-},pagecommand=\subsection{Capacité d'échange cationique}]{protocole/CEC.pdf}
\includepdf[scale=0.8,pages={1-},pagecommand=\subsection{Analyse carbone, hydrogène et azote}]{protocole/CHN.pdf}
\includepdf[scale=0.8,pages={1-},pagecommand=\subsection{pH}]{protocole/pH.pdf}
\includepdf[scale=0.8,pages={1-},pagecommand=\subsection{Phosphore biodisponible}]{protocole/phosphore.pdf}

\section {Tableaux des résultats}

\includepdf[scale=0.8,pages={1-},pagecommand=\subsection{Semences employées}]{tableau/semencesUFA.pdf}
\includepdf[scale=0.8,pages={1-},pagecommand=\subsection{Développement des espèces}]{tableau/species_shoot.pdf}
\includepdf[scale=0.8,pages={1-},pagecommand=\subsection{Résultats généraux de la végétation}]{tableau/vegetation_general.pdf}
\includepdf[scale=0.8,pages={1-},pagecommand=\subsection{Caractéristique des sols}]{tableau/results_soil.pdf}
\includepdf[scale=0.8,pages={1-},pagecommand=\subsection{\textit{P. lanceolata}, génotype basse altitude}]{tableau/plantago_low_species.pdf}
\includepdf[scale=0.8,pages={1-},pagecommand=\subsection{\textit{P. lanceolata}, génotype haute altitude}]{tableau/plantago_high_species.pdf}

\section {Script R}

• Welcome to TeX - LaTeX! You should complete you code snippet to a minimal document. The reason that is moved to the next page is that it is too large for the remaining space. Would it be acceptable to add a \clearpage before each \section ? – Andrew Swann Jun 21 '17 at 10:53
• \includepdf forces a new page. You can either add the \section command to the pagecommand key, or you will have to use \includegraphics instead of \includepdf for the first page. – Ulrike Fischer Jun 21 '17 at 10:56

Thank you! I use the Andrew Swann method, I took out the first \subsection, I use \includegraphics for the first page, then I use \includepdf for the rest! So my document looks like this now:
\section{Protocoles}