[Tex/LaTex] The logo doesn’t appear properly in the letter

fancyhdrletterheadletters

I want to have the college logo at the center (in the header) followed by the college name, then a horizontal line , then the letter content.

But My Logo is half cut:

Here is the code:

\documentclass{letter}

\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage{lipsum}

\geometry{headheight = 275pt}
\fancypagestyle{firstpage}{\fancyhf{}\fancyhead[R]{\includegraphics[scale=0.70, keepaspectratio=true]{pecemblem.pdf}}}
\fancypagestyle{plain}{\fancyhf{}\fancyhead[L]{\includegraphics[height=0.5in, keepaspectratio=true]{pecemblem.pdf}}}
\pagestyle{plain}
\begin{document}%
    \begin{letter}{}%
        \opening{Dear Some Name,}
        \lipsum[1-10]
    \end{letter}%
\end{document}%

The output I get is:

enter image description here

Best Answer

If you want the logo to be centered you have to use \fancyhead[C]. If you substitute C with R you'll have it at the right and with L you'll have it at the left.

Also, play a little with headheight and with the scale options in \includegraphics to obtain the optimal result.

For example, with the following MWE and pecemblem.png downloaded from http://www.pec.edu/images/pecemblem.png

\documentclass{letter}

\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage{lipsum}

\geometry{headheight=75pt,top=140pt}
\fancypagestyle{firstpage}{\fancyhf{}\fancyhead[C]{\includegraphics[scale=0.7]{pecemblem}}}
\fancypagestyle{plain}{\fancyhf{}\fancyhead[C]{\includegraphics[height=0.5in]{pecemblem}}}
\pagestyle{plain}
\begin{document}%
    \begin{letter}{}%
        \opening{Dear Some Name,}
        \lipsum[1-10]
    \end{letter}%
\end{document}%

I get

enter image description here

Related Question