# Logotype without moving header on every page down

I am trying to insert a logo on the first page without moving the header on every page down. With the following code the logo get inserted but every header on every page is pushed down.

The code (before \begin{document}):

\usepackage{fancyhdr, graphicx}
\includegraphics[width=3.5cm]{jedem.pdf}
}
\pagestyle{plain}


The code (after \begin{document}):

\thispagestyle{fancy}


Appreciate if someone can point me in the right direction.

-

If you include it like this,

\fancyhead[R]{%
\raisebox{0pt}[0pt][0pt]{\includegraphics[width=3.5cm]{jedem.pdf}}%
}


then it will not change the vertical header position. But you must make sure there is enough space to the top margin so that the logo doesn't go off the page.

Edit: If you want to move the logo down, replace {0pt} by e.g. {-1ex}.

-
I have set the top margin to the following: \setlength{\topmargin}{-8mm} - any changes to it will cause all top-margins to move. I also tried to change the first 0pt but then all pages move. This seems to be a good solution but the logo needs to be pushed down without moving the top-margin of subsequent pages. – kexxcream Apr 7 '12 at 6:25
I updated the answer with a way to move the logo down (without moving anything else). The fancyhdr package doesn't seem to offer an easy interface to changing the page geometry for accomodating a larger header. Try the geometry package for this. – Stephan Lehmke Apr 7 '12 at 6:58
This seems to work quite well. It produce the result that I wanted. What is the function of {0pt}? – kexxcream Apr 7 '12 at 8:23
It is the primary function of \raisebox: To raise (or lower in case of a negative value) something relative to the baseline. – Stephan Lehmke Apr 7 '12 at 12:28

This is tikz way of doing things like this. You can use \thispagestyle option to apply logo settings only for one page.

\documentclass[oneside,12pt]{article}
\usepackage[demo]{graphicx}% <-----remove demo in your file
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage[charter]{mathdesign}
\usepackage{lipsum} %<-----provides dummy text, remove in your file
\usepackage{fancyhdr}
%---------------------------------------------
\fancypagestyle{logo}{%
\fancyhf{}   % Clear all headers and footers first
\begin{tikzpicture}[baseline,remember picture,overlay]
\node at ([xshift=-2.5cm,yshift=-2.5cm]current page.north east) {\includegraphics[width=3.5cm]{jedem.pdf}};
\end{tikzpicture}
}%
\renewcommand{\footrulewidth}{0pt}
}%
%Change the values in xshift and yshift as per your needs
%---------------------------------------------
\thispagestyle{logo}
\begin{document}
\lipsum[1-5]
\newpage
\lipsum[6-8]
\end{document}


The first page:

and the second page:

Edit: This is the confusion you will be causing by not providing a complete MWE. You gave only a code snippet and I was left wandering alone to make wild guesses regarding your need. Now that I know - you are using a \maketiltle. \maketitle comes bundled with \thispagestyle{plain}. Hence you have to redefine the \pagestyle{plain}.

Further you used xshift=3cm,yshift=3cm that falls outside the page range. Hence with these shifts you will never get an image inside the page. Please keep these values negative. Here is the code.

\documentclass[a4paper,12pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[swedish]{babel}

\usepackage[demo]{graphicx}
\usepackage[T1]{fontenc}
\usepackage{tikz,lipsum}
\usepackage{fancyhdr}
%---------------------------------------------
\fancypagestyle{plain}{%
\fancyhf{}%
\begin{tikzpicture}[baseline,remember picture,overlay]
\node at ([xshift=-3cm,yshift=-3cm]current page.north east) {\includegraphics[width=3.5cm]{jedem.pdf}};
\end{tikzpicture}%
}%
\renewcommand{\footrulewidth}{0pt}
}%
%---------------------------------------------

\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}

\usepackage{titling}
\pretitle{\begin{flushleft}\LARGE}
\posttitle{\par\end{flushleft}}
\preauthor{\begin{flushleft}\large}
\postauthor{\par\end{flushleft}\vskip 1.5em}
\predate{\begin{flushleft}\large}
\postdate{\par\end{flushleft}\vskip -5em}

\setlength{\parskip}{1.2ex}        % space between paragraphs
\setlength{\parindent}{1em}        % amount of indention
\setlength{\textwidth}{17cm}       % default = 6.5"
\setlength{\oddsidemargin}{-5mm}   % default = 0"
\setlength{\textheight}{225mm}     % default = 9"
\setlength{\topmargin}{-8mm}       % default = 0"

\title{Testing}
\author{Mr Test}
\date{}
\begin{document}
\maketitle
\noindent
{\bf Abstract}
\end{document}


-
I have tried your suggestion but the logo in the pdf does not show up. This is the current code: pastebin.com/PM77sKPD – kexxcream Apr 7 '12 at 8:18
@kexxcream You have to remove the [demo] option from \usepackage{graphicx}, which Harish Kumar used not having your graphic file available. – egreg Apr 7 '12 at 23:43