Skip to content

pgfpages layout "two screens with optional second" with "second top" do not show shading picture correctly #1333

@lrtfm

Description

@lrtfm

Brief outline of the bug

In the following MWE, a shading colour is created firstly, and then used in pgfpicture to show it in the top of the second logical page. When using option "second right" for the layout "two screens with optional second", everything is OK. However, changing "second right" to "second top" the shading colour also disappear. How to make the option "second top" show the shading picture correctly?

The result pdf with option:"second right"

The result pdf with option:"second top"

Minimal working example (MWE)

\documentclass[a5paper, landscape]{article}
\usepackage{pgf}
\usepackage{pgfpages}

% WITH OPTION "second right", everything is OK.
\pgfpagesuselayout{two screens with optional second}[second top]

\pgfdeclareverticalshading{headfade}{\paperwidth}%
{%
  rgb(0cm)=(0.9, 0.9, 0.9);
  rgb(3cm)=(0.8, 0.8, 0.9)%
}

\begin{document}

{\Huge Text for main page.}
\clearpage

\pgfpagescurrentpagewillbelogicalpage{2}
{\Huge Text that goes to second page.}

\pgfrememberpicturepositiononpagetrue
\begin{pgfpicture}
  \pgfusepath{use as bounding box}
  \pgftransformshift{\pgfpointanchor{current page}{north west}}
  \pgftext[top, left]{\pgfuseshading{headfade}}
\end{pgfpicture}

\end{document}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions