1

When I try to insert image like this

\fancypagestyle{mystyle}
{
\setlength{\headheight}{15pt}
\lhead{} \chead{} \rhead{\includegraphics[scale=0.05,trim ={0.25mm 0.25mm 0.25mm 0.25mm},clip=true]{mylogo.pdf}}
\lfoot{} \cfoot{\thepage} \rfoot{}
\renewcommand{\headrulewidth}{0.35 pt}
\renewcommand{\footrulewidth}{0 pt}
}
\pagestyle{mystyle}

it just wont work, and I

\usepackage{graphicx}

I just got logo.pdf text on that place and small little rectangle

I have this

%%HEADER
\fancypagestyle{mystil}
{
\setlength{\headheight}{15pt}
\lhead{} \chead{} \rhead{\includegraphics[scale=0.05,trim ={0.25mm 0.25mm 0.25mm 0.25mm},clip=true]{logo.pdf}}
\lfoot{} \cfoot{\thepage} \rfoot{}
\renewcommand{\headrulewidth}{0.35 pt}
\renewcommand{\footrulewidth}{0 pt}
}
\pagestyle{mystil}

and this on new page

\newpage
\pagestyle{mystil}
2

This MWE here:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{lipsum}
\fancypagestyle{mystyle}
{
\setlength{\headheight}{15pt}
\lhead{} \chead{} \rhead{\includegraphics[scale=0.05,trim ={0.25mm 0.25mm 0.25mm 0.25mm},clip=true]{example-image}}
\lfoot{} \cfoot{\thepage} \rfoot{}
\renewcommand{\headrulewidth}{0.35 pt}
\renewcommand{\footrulewidth}{0 pt}
}
\pagestyle{mystyle}
\begin{document}
\lipsum
\end{document}

works as expected:

enter image description here

See why preparing a fully working minimal working example (MWE) is so important?

Probably in the process of preparing it, you will be able to find the error --- it happened a lot of times to me. And without it, we can't guess the origin of the problem.

| improve this answer | |
  • hahah, idk why won't work at me - maybe miktex need a few compiling :D about which braces You're talking? – amygdala27 May 18 at 17:51
  • ---sorry, wrong comment ;-). From your description you probably had a draft option somewhere... – Rmano May 18 at 17:54
  • np, how can i fix that? haha – amygdala27 May 18 at 17:55
  • @amygdala27 I can't help without a fully compilable code, sorry. (I suppose idk means I do know, can't understand "np"). – Rmano May 18 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.