# Include correct label with \includepdf

I'm using the \includepdf command for adding appendices to my thesis.

\newpage
\includepdf[pagecommand={},scale=0.8,pages=1,pagecommand=\section{Document for \gls{dpia}}
]{appendices/DPIA-geoparsing.pdf}
\includepdf[scale=0.8,pagecommand={},pages=2-]{appendices/DPIA-geoparsing.pdf}
\label{appendix:dpia}


The label doesn't work correctly it's referencing a different appendix. Is it possible to use labels like this on \includepdf? If not how can I correctly label my PDF.

\includepdf[pagecommand={},scale=0.8,pages=1,pagecommand=\section{Document for \gls{dpia} \label{appendix:dpia}}

By including the label as part of the section in the pagecommand.