# Pspicture to Cover the Entire Page

I am working on a book whose geometrical page dimensions (W x H) are 4" x 6".

For one page, I would like to perfectly display a 4" x 6" pspicture.

Consider the following code:

\documentclass{book}
\usepackage[showframe,paperwidth=4in,paperheight=6in]{geometry}
\textheight=6in \textwidth=4in
\usepackage[frame,noinfo,center]{crop}
\usepackage{xcolor}
\usepackage{pstricks,psvectorian}

\definecolor{cadmiumgreen}{rgb}{0.0, 0.42, 0.235} % 0, 107, 60
\psset{unit=1in}

\begin{document}
\thispagestyle{empty}

\begin{pspicture}(0,0)(4,6)%

\renewcommand*{\psvectorianDefaultColor}{red}%

\rput(0,5){PLACED AT (0,5)}
\end{pspicture}
\end{document}


In the case of the MWE, I am trying to code a 4" x 6" solid green page. However, (including the worded display at the point (0,5)), this is what is produced:

By the displayed note, PLACED AT (0,5)'', it seems that Latex has produced what it recognizes as a 4x6 green pspicture. However, there is much white space also displayed, which to me indicates that if the pspicture is 4x6, then the dimensions of the page are not 4x6, despite the commands, \usepackage[showframe,paperwidth=4in,paperheight=6in]{geometry} \textheight=6in \textwidth=4in.

I'm not sure what has caused all this.

QUESTION: Overall, how may I accomplish the following: (1) a page to be printed on 4" x 6" paper, with (2) a 4" x 6" pspicturethat entirely covers the said page --- so that when I print the output on 4" x 6" paper, the page is entirely comprised of the said pspicture?

Remarks: The pstricks and psvectorian packages are included in the MWE because I may be using them in the actual pspicture. The code is compiled with xelatex.

Thank you.

The page size is defined by geometry and is exactly 4x6 inches as seen in the properties of the pdf file.

An easy way to place a 4x6 inch figure in the center of a 4x6 inch page is to use a tikz node.

Frame line color was set to red to verify the correct positioning.

\documentclass{book}
\usepackage[showframe,paperwidth=4in,paperheight=6in]{geometry}
\textheight=6in \textwidth=4in
\usepackage[frame,noinfo,center]{crop}
\usepackage{xcolor}
\usepackage{pstricks,psvectorian}

\definecolor{cadmiumgreen}{rgb}{0.0, 0.42, 0.235} % 0, 107, 60

\psset{unit=1in}

\newcommand{\placecover}{% put the image in the center of the page <<<<<<<<<
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.center){\coverimg};
\end{tikzpicture}}

\newcommand{\coverimg}{% define the image <<<<<<<<<
\begin{pspicture}(0,0)(4,6)%
\renewcommand*{\psvectorianDefaultColor}{red}%
\psframe[linecolor=red](0,0)(4,6)% frame changed <<<<<
\end{pspicture}}

\begin{document}
\thispagestyle{empty}
\placecover % place the image
\end{document}

• Many thanks Simon Dispa for this very helpful answer. Nov 27, 2022 at 20:46

Does this satisfy

\documentclass{book}

\usepackage[paperheight=6in, paperwidth=4in, margin=0pt, showframe]{geometry}
\usepackage{xcolor, pstricks}

\psset{unit=1in}

\begin{document}
\thispagestyle{empty}
\noindent
\begin{pspicture}(0,0)(4,6)

\psframe[%
fillstyle=solid,