# How to remove 1 inch paddings without using \hoffset and \voffset?

I usually do the following to remove 1 inch padding.

\documentclass{minimal}
\usepackage{pstricks}
\paperwidth=72.27pt
\paperheight=72.27pt
\voffset=-72.27pt
\hoffset=-72.27pt
\parindent=0sp
\special{papersize=\the\paperwidth,\the\paperheight}
\begin{document}
\begin{pspicture}(\paperwidth,\paperheight)
\psframe[linecolor=red](\paperwidth,\paperheight)
\end{pspicture}
\end{document}


How to remove 1 inch paddings without using \hoffset and \voffset?

-
I will tidy up the question above after migrating Herbert's answer. – xport Jul 17 '11 at 20:01
The answer is already in Herbert's and mine answers to the other question. Use geometry and be happy: why reinvent the wheel? :) Performance time in loading geometry? – egreg Jul 17 '11 at 20:13
@egreg: For creating a single graphics, I don't need geometry.sty. I want to take a full control. :-) – xport Jul 17 '11 at 20:18
@egreg: If I used geometry.sty, I will not know whether or not there are rounding errors in the author's calculation. – xport Jul 17 '11 at 20:22
@xport: If you are that worried about having ultimate control, then LaTeX is a bad choice: use plain TeX and define only what you want. – Joseph Wright Jul 17 '11 at 20:42

sets the left and top margin to 0pt

\documentclass[a4paper]{article}
\oddsidemargin=-1in
\topmargin=-1in
\parindent=0pt
\usepackage{layout}
\begin{document}

\rule{\textwidth}{\textheight}

\layout

\end{document}

-
I prefer using 72.27 to get the exact value. :-) – xport Jul 17 '11 at 20:53
\oddsidemargin=-1in

I prefer using 72.27pt because using 1in causes rounding error. – xport Jul 17 '11 at 20:38