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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .