add tag
samcarter
I'm using a custom pgfpages layout in which the pages partially overlap.

I'm wondering if it is possible to change the z-order of the pages so that in the following example, the red page would overlap the green page? 

I have alternative solutions with externalising the included document and similar, but I'm curious if this would be possible with pgfpages.


```
\documentclass{article}

\usepackage{xcolor}
\usepackage{lmodern}
\usepackage{pgfpages}

\pgfpagesdeclarelayout{quack}
{
  \edef\pgfpageoptionheight{\the\paperheight} 
  \edef\pgfpageoptionwidth{\the\paperwidth}
  \edef\pgfpageoptionborder{0pt}
}
{
  \pgfpagesphysicalpageoptions
  {%
    logical pages=2,%
    physical height=\pgfpageoptionheight,%
    physical width=\pgfpageoptionwidth%
  }
  \pgfpageslogicalpageoptions{1}
  {%
    border shrink=\pgfpageoptionborder,%
    resized width=.8\pgfphysicalwidth,%
    resized height=.8\pgfphysicalheight,%
    rotation=-20,%
    center=\pgfpoint{.4\pgfphysicalwidth}{.5\pgfphysicalheight}%
  }%
  \pgfpageslogicalpageoptions{2}
  {%
    border shrink=\pgfpageoptionborder,%
    resized width=.8\pgfphysicalwidth,%
    resized height=.8\pgfphysicalheight,%
    rotation=-20,%
    center=\pgfpoint{.6\pgfphysicalwidth}{.5\pgfphysicalheight}%
  }%
}

\pgfpagesuselayout{quack}[landscape]

\begin{document}

\fontsize{100}{100}\selectfont

\pagecolor{red}1

\newpage

\pagecolor{green}2

\end{document}
```


![document-1.png](/image?hash=007e8a701d734a3d85486c21b314e95ffd09fbd731fedf210d6195e2104a4169)

### Desired result:

![document.png](/image?hash=a02a78fa87d76f68a2f35702eb62cc0a49c35680cd329de3c3b92759813b4307)

This room is for discussion about this question.

Once logged in you can direct comments to any contributor here.

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.