[Tex/LaTex] How to put a textblock above the background image

eso-pictextpos

I'm trying to implement this solution while using textpos but the textblock*s seem to land below the "background" image instead of above. Can one overcome this?

A minimal example would be:

\documentclass[a4paper,landscape]{article}

\usepackage{lipsum, tikz}

\usepackage[absolute]{textpos}

\usepackage{eso-pic}
\newcommand\BackgroundPic{%
  \put(0,0){
    \parbox[b][\paperheight]{\paperwidth}{
      \includegraphics[width=\textwidth]{somepic.png}
    }
  }
}

\begin{document}
\AddToShipoutPicture*{\BackgroundPic}

\textblockcolour{black}

\begin{textblock*}{10cm}(2cm, 2cm)
Invisible \lipsum[1]
\end{textblock*}

\end{document}

Best Answer

Try

\usepackage[absolute,overlay]{textpos}

The overlay option is designed for this situation, where other packages use the same \shipout mechanism, and put things ‘on top of’ the boxes which the textpos package generates.

[overlay] When using the absolute-position mode, the textblocks are placed under any other text on the page. This is normally what you want, but if you have page contents, and they have something which obscures the textblocks (for example, a block of opaque colour), then the positioned textboxes disappear. In this case, specify the option [overlay], to request that the positioned blocks of text overlay any other page contents, rather than being overlaid.