You can't do this in regular Tex: the DVI format specifies the coordinate bounds in the preamble (maxv
, maxh
) and has no opcodes to change the values once set. DVI doesn't really have a notion of page dimension anyway; cf. my answer to the dvi generation: no bounding box question. You might be able to mess about with Postscript specials and do this that way: I don't know how.
In Pdftex (and Xetex), you can change pdf dimensions; e.g.:
\documentclass{article}
\begin{document}
Normal page
\eject \pdfpagewidth=3in \pdfpageheight=10in
Tall page
\eject \pdfpagewidth=10in \pdfpageheight=3in
Wide page
\end{document}
It's best to issue these dimension changes before anything has been typeset on the page, since these dimensions affect how Tex lays out content. Also note that your choice of margins, etc., should be guided by page dimensions.