This is perhaps a simple question with a simple answer, but I'm stumped as a tikz novice. What would be the best method to add an image (logo) file to the upper left-hand corner of my document?

sample document with desired result





\section*{Lorem Ipsum}



I wish to avoid using fancyhdr to achieve this result.

  • Do you want the image on every page of your document, or only on one?
    – Jake
    Dec 19, 2011 at 6:06
  • Every page would be preferable, but both solutions would be great to see (if anyone is willing/has the time). Sorry, I failed to mention this.
    – user2473
    Dec 19, 2011 at 6:09
  • 3
    If you want the image on every page, you can put your TikZ code into the header (tex.stackexchange.com/questions/4930/tikzpicture-on-every-page). If you only need it for a single page, \tikz [remember picture, overlay] \node at (current page.north west) [anchor=north west] {\includegraphics{...}}; should do the trick.
    – Jake
    Dec 19, 2011 at 6:13
  • You can also find an example similar to what Jake has given in the pgf manual on page 200. (version 2.10)
    – percusse
    Dec 19, 2011 at 6:17
  • 2
    @Caleb: Try putting a % at the end of the line containing the TikZ code.
    – Jake
    Dec 19, 2011 at 6:23

2 Answers 2


While tikz is powerful, eso-pic can also be used to perform this via \AddToShipoutPictureBG (or \AddToShipoutPictureFG):

enter image description here


\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{showframe}% http://ctan.org/pkg/showframe
\usepackage{eso-pic}% http://ctan.org/pkg/eso-pic
\usepackage{graphicx}% http://ctan.org/pkg/graphicx



\section*{Lorem Ipsum}

  • 1
    How can you include this on one single page? Now it shows up in multiple pages.
    – kexxcream
    Aug 4, 2016 at 17:37
  • 1
    @kexxcream: Use the starred version: \AddToShipoutPictureBG* or \..FG*. Add it to the page of interest and it will be added when the page is shipped out.
    – Werner
    Aug 4, 2016 at 19:30

You can use the background package which internally relies on tikz to place either an imported graphic logo or a logo created with a tikzpicture on each page or on selected pages:

enter image description here

The code below places the image on each page. However, if you only want to place the logo on some of the pages you would simply load the package with the some option:


and then issue the \BgThispage on the pages where you wanted the logo. An example of including the image on specific pages (ex, 2, 3, and 6) can be found in Image on top specified page.


  • Need at least two runs to see the logo.




\newcommand{\MyGraphicLogo}{% For imported graphic logo
\begin{tikzpicture}[remember picture,overlay,yshift=-2cm, xshift=2cm]
  \node at (0,0) {\includegraphics[width=2cm,height=2cm]{foo}};

\newcommand{\MyTikzLogo}{% For a logo drawn with TikZ
\begin{tikzpicture}[remember picture,overlay,yshift=-1cm, xshift=1cm]
    \draw [cyan,fill=yellow] (0cm,0cm) 
        -- (2cm,  0cm) 
        -- (2cm, -2cm)
        -- (0cm, -2cm)
        -- cycle;

%\SetBgContents{\MyGraphicLogo}% Select included image
\SetBgContents{\MyTikzLogo}% Select tikz picture

\SetBgPosition{current page.north west}% Select location
\SetBgOpacity{1.0}% Select opacity
\SetBgAngle{0.0}% Select roation of logo
\SetBgScale{1.0}% Select scale factor of logo

\section*{Lorem Ipsum}
  • Thanks for the answer based on the background package. Suppose I would like to do exactly the same thing but with the logo placed on the top right corner. I try to set the position as current page.north east. It doesn't seem to work (no picture). May I please know what is the problem in this case? Sep 16, 2014 at 9:57
  • 1
    @AbhimanyuArora: I think you'll need to adjust the xshift to be negative in that case. If that does not solve your issue, please post a new question. Sep 16, 2014 at 16:31
  • @AbhimanyuArora: or try to play with anchors Apr 11, 2016 at 17:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .