# [texhax] pdfpages and page numbers

Jerry jerry at seibercom.net
Thu Aug 31 15:57:08 CEST 2017

```After doing some research, I found that I can get page numbers included on
pages created by the "\includepdf{file} command by using this format:

\includepdf[pages=-,pagecommand={\thispagestyle{fancy}}]{FILENAME.pdf}

I would like to include the "[pages=-,pagecommand={\thispagestyle{fancy}}]"
part in the document preamble so I don't have to type it every time I use that
command. I have tried different methods, but i either get an error message or
it just doesn't work. By the way, I do have the "fancyhdr" and "pdfpages"