1

Hello when I run the following code the drawing gets applied to all pages. If there a way to apply the drawing only in the first page. (Just as a note the code is not mine and I found it from stack exchange by another user)

\documentclass{article}
\usepackage[margin=0.5cm,bottom=2cm]{geometry}
\usepackage{kpfonts}
\usepackage{eso-pic}                
\usepackage{tcolorbox}

\tcbuselibrary{skins}

\tcbset{
    pccstyle/.style={
        enhanced,flushright upper,
        boxrule=1.4pt,
        colback=white,colframe=black!50!yellow,
        drop fuzzy midday shadow=black!50!yellow
    }
}

\AddToShipoutPicture{% from package eso-pic: put something to the background
    \AtPageCenter{% start the bar at the bottom right of the page
        \put(-\LenToUnit{.465\paperwidth},-\LenToUnit{.4\paperheight}){% move it to the middle
            %{\transparent{.5}{\includegraphics[width=20cm]{50th_mathematicsproof}}}
            \begin{tcolorbox}[pccstyle,left=0mm,top=0mm,bottom=0mm]
                %\includegraphics[width=20cm]{50th_mathematicsproof}
            \end{tcolorbox}
        }%
    }%
    \AtPageLowerLeft{% start the bar at the bottom right of the page
        \put(\LenToUnit{\dimexpr\paperwidth-3cm},0){% move it to the top right
            \color{blue}\rule{3cm}{\LenToUnit\paperheight}%
        }%
        \put(\LenToUnit{\dimexpr\paperwidth-2.7cm},\LenToUnit{17cm}){% move it to the top right
            \color{gray}\scalebox{8}{$\sum$}
        }%
        \put(\LenToUnit{\dimexpr\paperwidth-2.5cm},\LenToUnit{12.5cm}){% move it to the top right
            \color{gray}\scalebox{8}{$\int$}
        }%
        \put(\LenToUnit{\dimexpr\paperwidth-2.3cm},\LenToUnit{8.5cm}){% move it to the top right
            \color{gray}\scalebox{8}{$e$}
        }%
        \put(\LenToUnit{\dimexpr\paperwidth-2.7cm},\LenToUnit{5.0cm}){% move it to the top right
            \color{gray}\scalebox{8}{$\pi$}
        }%
        \put(\LenToUnit{\dimexpr\paperwidth-2.2cm},\LenToUnit{1.5cm}){% move it to the top right
            \color{gray}\scalebox{8}{$i$}
        }%
    }%
}

\pagestyle{empty}
\begin{document}

\vspace*{1cm}
\mbox{}\hfill\scalebox{2}{
    \begin{tcolorbox}[pccstyle,width=6.8cm]
        {\bfseries\LARGE {Program Review} \par}
        {\large \itshape Mathematics \par}
        {\large Portland Community College }
    \end{tcolorbox}
}

\vfill
\centering

\scalebox{2}{%
    \begin{tcolorbox}[pccstyle,width=4.8cm]
        {\scshape Fall 2008--Spring 2013}
    \end{tcolorbox}
}

\newpage
Test
\newpage
test

\end{document}

1 Answer 1

1

eso-pic provides starred versions of its \AddToShipoutPictureFG and \AddToShipoutPictureBG routines. These starred versions print their contents on the current page only.

So, use \AddToShipoutPictureBG* (even if placed in the preamble, it will apply to the first page only).

enter image description here

1
  • Thank you for answering!
    – 주성우
    Jan 17, 2022 at 8:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .