[Tex/LaTex] Logo as header using fancyhdr package

fancyhdrheader-footerpositioning

I want to use Logo as header in my document. However, I have not figured out how to use fancyhdr package efficiently. Text over wrap the header. Any help will be highly appreciated. Thanks

\documentclass{article}
\usepackage{blindtext}
\usepackage{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm, headheight=3pt, footskip=3pt}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage[colorlinks=true,urlcolor=blue]{hyperref}

\fancyhf{}
\fancyhead[C]{
\vspace*{-1.2cm}
\begin{center}
  \makebox[\textwidth]{\includegraphics[width=\textwidth, height=6cm]{LogoUAFMathStat.png}}
\end{center}
}


\pagestyle{fancy}


\begin{document}

\section{Introduction}
\blindtext[25]

\end{document}

LogoUAFMathStat.png is here

Best Answer

You can set the known parameter, like the side margins first, then

\savebox\headbox{\includegraphics[width=\textwidth]{logo}}

With that savebox you can now calculate the header height and add some extra as that will be the effective top margin with the calc package:

\setlength{\mytopmargin}{\totalheightof{\usebox\headbox} +1cm}

Complete MWE

\documentclass{article}
\usepackage{blindtext,calc,graphicx}
\usepackage{geometry}
\geometry{verbose,
          bmargin=2cm,
          lmargin=2cm,
          rmargin=2cm,
          footskip=3pt}
\newlength\mytopmargin
\newsavebox{\headbox}\savebox{\headbox}{\includegraphics[width=\textwidth]{LogoUAFMathStat}}
\setlength{\mytopmargin}{\totalheightof{\usebox{\headbox}}+2cm}
\geometry{verbose,
          tmargin=\mytopmargin,
          headheight=1.1\mytopmargin}
\usepackage{fancyhdr}
\fancyhf{}
\fancyhead[C]{\usebox\headbox}
\renewcommand{\headrulewidth}{0pt}
\pagestyle{fancy}
\begin{document}
\section{Introduction}
\blindtext[25]
\end{document}

enter image description here