I was unable to get textblock*
to achieve your goal, so I wrote a substitute, using the everypage
package, \mytextblock}{width}{x-pos}{y-pos}{content}
.
The background is inserted with an \atxy{xpos}{ypos}{content}
.
The current implementation only supports one textblock color per page. Let me know if that is sufficient.
In the MWE, after placing the background image, I lay down two text blocks, the second (of \lipsum[3]
) is positioned to directly underlay an actual incarnation of \lipsum[3]
, so that one can observe that the dimensions match.
One thing that I don't know about the real textblock
is whether it is supposed to overlay or underlay the actual page content. In my implementation, it underlays. If that is the incorrect behavior, then this effort is for naught.
\documentclass[a4paper,landscape]{article}
\usepackage{lipsum,everypage,xcolor,graphicx}
\def\PageTopMargin{1in}
\def\PageLeftMargin{1in}
\newcommand\atxy[3]{%
\AddThispageHook{\smash{\hspace*{\dimexpr-\PageLeftMargin-\hoffset+#1\relax}%
\raisebox{\dimexpr\PageTopMargin+\voffset-#2\relax}{#3}}}}
\newsavebox\blockbox
\newcommand\mytextblock[4]{%
\savebox\blockbox{\parbox[b]{#1}{#4}}%
\atxy{#2}{#3}{%
\textcolor{\themytextblockcolor}{\rule[-\ht\blockbox]{\wd\blockbox}{\ht\blockbox}}}%
}
\newcommand\mytextblockcolor[1]{\edef\themytextblockcolor{#1}}
\mytextblockcolor{black}
\begin{document}
\atxy{0pt}{\paperheight}{\includegraphics[width=\paperwidth]{example-image}}
\mytextblockcolor{green}
\mytextblock{10cm}{2cm}{2cm}{\lipsum[1]}
\mytextblock{\textwidth}{8.75cm}{12.65cm}{\lipsum[3]}
\lipsum[1-3]
\end{document}
