I am including a PDF file as part of my reports appendices.

The PDF file does not have page numbers, these are added using pagecommand=\thispagestyle{plain} which continues the LaTeX page numbering.

\includepdf[pages=-, pagecommand=\thispagestyle{plain}]{file.pdf}

How would I make it possible to refer to each PDF page using \pageref{} in the rest of my report?

1 Answer 1


Here's a quick hack:




The second page of the included PDF file is on page~\pageref{file-2}.



The custom counter pdfpage needs to be reset with every new includepdf.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.