# How to stop wallpaper package hiding fancyhdr page numbers

When I use the wallpaper package to put a background behind a slide or document, and then use fancyhdr to try and paginate the document the page numbers dont show up. Am I doing something wrong, or is there a process for bringing the page numbers back? Thanks

\documentclass[landscape]{article}
\usepackage[top=0.75in, bottom=0.75in, left=0.7in, right=2in]{geometry}
\usepackage{microtype,lipsum}
\geometry{letterpaper}
\usepackage{wallpaper}
\usepackage{fancyhdr}
\fancyhf{}
\rfoot{\thepage}
\pagestyle{fancy}

\begin{document}

\lipsum[1-5]

\end{document}


Image for background of MWE attached below...

-
\topmargin=0.25in \headheight=1in \headsep=0.1in is moving the text body down and so the page number is outside the page. Setup the layout only with geometry to get consistent and senseful values. –  Ulrike Fischer Sep 3 '12 at 12:36
Thanks @UlrikeFischer that solved the immediate problem and showed me why I was doing wrong. –  Tahnoon Pasha Sep 3 '12 at 22:00

You may try the xwatermark package. Read the user guide.

\documentclass[final,showpagenos]{article}
\usepackage[printwatermark]{xwatermark}
\usepackage[svgnames]{xcolor}
\makeatletter
% Redefining \xwm@f@ncypagenos for a reason:
\robust@redef*\xwm@f@ncypagenos{%
\def\pgn@textmark{%
\begingroup
\fboxrule\pgn@framerule\fboxsep\pgn@framesep\relax
\pgn@format{\normalfont\pgn@style}%
\endgroup
}%
\cptswitchtrue{xwm@fancy}%
\xwm@textbox{pgn}%
\cptswitchfalse{xwm@fancy}%
}
\watermarkpaths[.](/){{}{/graphics}} % your path may be different
\newwallpaper*[
page=1,picangle=0,tile-xoffset=0pt,tile-yoffset=0pt,square-tiles,
text-on-top-picture,boxalign=center,pic-bounding-box=125 551 340 668,
%number-of-tiles=8,top-left
]{}

\fancypagenos[
textalign         = center,
show-page-numbers = true,
show-on-page-one  = true,
textcolor         = red,
y-position        = -.42\paperheight,
x-position        = 0,
scale             = 2,
angle             = 0,
style             = \textsc{Page~\thepage~of~\pageref{xwmlastpage}}
]
\makeatother

\begin{document}
x
\end{document}


-
Thanks @AhmedMusa. This is a new and interesting approach for me. Why are you redefining \xwm@fancypagenos? –  Tahnoon Pasha Sep 3 '12 at 22:02
The command \cptswitchtrue used to be called \switchtrue in the catoptions package. The public version of xwatermark still uses the old command. So without redefinition, you'll get the error 'undefined control sequence ...'. –  Ahmed Musa Sep 3 '12 at 23:59