OK, I found something I probably did for somebody called victor and simplified it a bit. Basically, the page command gets redefined each time \includepdf
is called and when page 1 of any such PDF is included. The first time, it is redefined to add the additional material. The second time, it is redefined not to. The upshot is that the material is used on only the first page of the included PDF.
\pdfminorversion=7
\begin{filecontents}{\jobname x.tex}% once written, you need to compile \jobname x.tex to produce \jobname x.pdf for inclusion below (the first run will produce an error but this is only for the example anyway)
\documentclass[a4paper]{article}
\usepackage{geometry}
\geometry{scale=.75}
\begin{document}
foo1\newpage foo2 \newpage foo3
\end{document}
\end{filecontents}
\documentclass[a4paper]{article}
\usepackage{geometry,pdfpages,etoolbox}
\geometry{scale=.85}
\makeatletter
\pretocmd{\includepdf}{%
\def\victor@dynpage{\victor@firstpage\global\let\victor@dynpage\relax}%
}
\newcommand*\dynpage[1]{%
\def\victor@firstpage{#1}%
\victor@dynpage}
\makeatother
\begin{document}
\includepdf[pages={-}, pagecommand=\dynpage{\subsubsection{Subsubsection}}]{\jobname x}
\end{document}

\documentclass...
and end\end{document}
and reproduce the issue when compiled.