The following works in PDFLaTeX:
\documentclass{article}
\begin{document}
Normal page
\eject \pdfpagewidth=3in \pdfpageheight=10in
Tall page
\eject \pdfpagewidth=10in \pdfpageheight=3in
Wide page
\end{document}
That should work with Xelatex. See the SO qn, Change paper size in the middle of a latex document?, for more.
The syntax paper=a4
is exclusive of the KoMa-Script classes, that is, scrartcl
, scrbook
, scrreprt
and scrlettr
.
No other class or package that I know of accepts it: the only notable exception is, of course, the package typearea
, which is part of the KoMa-Script bundle, to which the paper size options given to the KoMa-Script classes are deferred.
However, typearea.sty
says also
\KOMA@DeclareStandardOption[typearea]{a4paper}{paper=a4}
so that a4paper
as global option is recognized.
My preference would be to always use a4paper
. While I see virtues in KoMa-Script approach, it's non standard.
Notice that g-brief.cls
uses only A4 paper, while dinbrief
uses it by default, so for these two classes you can avoid specifying the option. Also scrlettr
uses A4 paper by default.
Best Answer
Hope the code is self explanatory.
For first,
and the second: