[Tex/LaTex] Base document page numbers with pdfpages

page-numberingpdfpages

I'm writing a report, in LaTeX. And I need to include, as appendices, other latex documents I have written. I am currently doing this using pdfpages and it works. However, the inserted PDF has no page numbers and it overlays my base documents page numbering, resulting in no page numbers on the PDF pages. My questions:

  1. How to solve the above problem.
  2. Is there a better way to do this.

Best Answer

pdfpages provides the pagecommand option for \includepdf, which can be used to apply a page style for each page, to print headings and more. For example, add plain page style or your own page style to get page numbers on all included pages:

\includepdf[pages=-,pagecommand=\thispagestyle{plain}]{filename}
Related Question