I want to simply add page numbers to my document in the format: #page out of #pages. I find this:
% This is based on the LLNCS.DEM the demonstration file of
% the LaTeX macro package from Springer-Verlag
% for Lecture Notes in Computer Science,
% version 2.4 for LaTeX2e as of 16. April 2010
%
% See http://www.springer.com/computer/lncs/lncs+authors?SGWID=0-40209-0-0-0
% for the full guidelines.
%
\documentclass{llncs}
\usepackage{fancyhdr}
\fancyhf{}
\cfoot{\thepage}
\pagestyle{fancy}
\begin{document}
\cfoot{page \thepage\ of \pageref{LastPage}}
\title{Title}
\author{Author}
\institute{Institute\\
\email{email}}
\maketitle
\begin{abstract}
\end{abstract}
\section{Section1}
\end{document}
But it adds a line at the header. Also, it does not add number for the first page in my document. How can I solve these two issues?


\renewcommand{\headrulewidth}{0pt};-) The first page is most often a\pagestyle{empty}, this depends on the documentclass or how the\maketitleetc. commands are defined. Without seeing real code, this is difficult to say. Reading the manual is definitely a way to Enlightenment ;-) – Jul 21 '16 at 18:01fancyhdr. Isfancyhdrallowed as a solution? – Werner Jul 21 '16 at 18:21\headrulewidthcommand (in order to switch of the header rule), so if this obstacle is removed,fancyhdris allowed (at least I declare it to be valid ;-)) – Jul 21 '16 at 18:25llncsis for journal submission and usingrunningheadswould display the necessary marks on pages. – Werner Jul 21 '16 at 18:40