1

I would like to place an image in the corner of each page.

Something like this:

https://tex.stackexchange.com/questions/44169/how-to-place-an-image-at-the-right-top-of-a-document

But I want a different image on each page. The images are numbered. For example, page 1 gets image 1.png in the corner, page 2 gets 2.png, et cetera.

I try to avoid to include each image by hand. The document is large, and I would like to avoid including and positioning 200 images by hand.

Is this possible, and how?

Patrik
  • 113
  • Yes, it is a duplicate, thank you. In case anyone wants to know, the answer is http://www.ctan.org/pkg/flipbook – Patrik Feb 12 '14 at 13:38

1 Answers1

1

An alternative to flipbook. Here files file1.jp, file2.jpg, etc. are displayed in the upper right corners of pages. You can play with the measures and sizes to shift it around. Current image size is 3cmx3cm, shifted 1cm to the right of the right margin (\Hoffset) and 1cm above the top margin (\Voffset).

I have EDITED the answer so that it compiles without figures. To add figures, just comment the one line and uncomment the other.

\documentclass{article}
\usepackage{everypage}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{calc}
\newlength\Hoffset
\newlength\Voffset
\Hoffset 1cm
\Voffset 1cm
\AddEverypageHook{\smash{\hspace{\oddsidemargin}%
  \hspace{\textwidth}\hspace{\Hoffset}%
  \raisebox{\Voffset-\headsep-\headheight-\topmargin}{%
% COMMENT OUT THE NEXT LINE
  \fbox{\rule{0cm}{3cm}\raisebox{1.3cm}{\makebox[3cm]{file\thepage.jpg}}}%
% UNCOMMENT THIS LINE
%  \includegraphics[height=3cm,width=3cm]{file\thepage.jpg}%
}}}
\begin{document}
\lipsum[1-7]
\end{document}

enter image description here