# Image as a header extend the top of page limits

How can I get one image as a header that is not just the header but extends to the top of the page limits and also left and right? I have see this Minipage in Header? but is not to have the image to the top of the page limits, and this How do I put the top of an image at the top of a page but I do not understand what to do

I have tried this but the result is not the expected. When Ι replace width=\textwidth with width=\pagewidth does not work.

\documentclass{article}

\usepackage{kantlipsum}
\usepackage{fancyhdr}
\usepackage[demo]{graphicx}

\pagestyle{fancy}

% \centering
% \vspace{-7cm}
\includegraphics[width=\textwidth,height=2.5cm]{logo.png}
}

% \fancyfoot[L]{\thepage}

\begin{document}
\kant
\end{document}


Update-1 What I want is probably very close to this approach http://www.texample.net/tikz/examples/fancy-chapter-headings/ but not be connected to the chapter but with one image

-
This question reminds me on How to include a picture over two pages, left part on left side, right on right (for books)?. Parts of its solution could be used here as well. –  Martin Scharrer Feb 6 '13 at 17:10
@MartinScharrer It had not fallen in my perception this question I will definitely use it in my main document –  karathan Feb 6 '13 at 17:46

Well the main points to solve things like this are

1. hide the actually extend of the graphic so that LaTeX thinks it has neither width nor height.
2. Move it around e.g. with \hspace and \raisebox. Picture environments can be use too.

\documentclass{article}
\usepackage{kantlipsum}
\usepackage{fancyhdr}
\usepackage[demo]{graphicx}

\usepackage[right=2.5cm,left=2.5cm,top=2.5cm,

\pagestyle{fancy}

\hspace*{\dimexpr -1in-\oddsidemargin}%
\makebox[0pt][l]{\normalsize %the [0pt] hides the width
+1in+\topmargin-\height}[0pt][0pt]{% the [0pt][0pt] hides height and depth
\includegraphics[width=\paperwidth,height=2.5cm]{logo.png}}}%
}

\begin{document}
\kant
\end{document}

-
Great answer. Just for reference here how to do the same using adjustbox: \usepackage[export]{adjustbox} \fancyhead[L]{% {\normalsize \includegraphics[width=\paperwidth,height=2.5cm,lap={0pt}{-1in-\oddsidemargin}, raise={\headheight-\dp\strutbox+1in+\topmargin-\height}{0pt}{0pt}]{example-image‌​}}% } –  Martin Scharrer Feb 6 '13 at 17:34
I delayed because I did my tests and works extremely! :) –  karathan Feb 6 '13 at 17:49
Could you give a clarification on "hide the actually extend of the graphic..." . Where exactly happens this inside the code? As you understand I'm not an expert I have lot of work ahead :) –  karathan Feb 6 '13 at 18:01
@karathan: I added two comments. –  Ulrike Fischer Feb 6 '13 at 18:02
@UlrikeFischer after addition of your comments I think I get it, definitely an excellent approach –  karathan Feb 6 '13 at 18:17