1

This question is similar to the unanswered How to put something on a page without disturbing the main vertical list? but (very slightly) more tightly defined.

I want to put a picture in the background of a page using eso-pic and \AddToShipoutPictureBG*.

Now, by default this page won't be output unless there is actually something on it.

I want it to show up when the page is empty and when the page contains content, but without knowing beforehand which case is wanted.

I can't just insert \null because this messes with the main vertical list and things like \section will then be at the wrong place at the top of the page.

Is there anything I can do or any work around?

MWE

\documentclass{article}
\usepackage{eso-pic}
\usepackage{graphicx}
\begin{document}
\AddToShipoutPictureBG*{%
  \AtPageCenter{%
    \makebox(0,0){\includegraphics{example-image.pdf}}}}
% <- insert something that doesn't mess with vertical spacing but causes the
%    page to be output.
% <- possible further content (e.g., \section{...}) or possibly no content.
\end{document}
David Purton
  • 25,884

0 Answers0