LaTeX - how do I force PDF page height/width?

The correct parameters to set are \pdfpageheight and \pdfpagewidth:

\pdfpageheight=11in
\pdfpagewidth=8.5in

However, this won't work in the "latex+dvips+ps2pdf" cycle. A code for both cases is

\usepackage{ifpdf}
\ifpdf
  \pdfpageheight=11in
  \pdfpagewidth=8.5in
\else
  \special{papersize=11in,8.5in}
\fi

The geometry way is better:

\usepackage[pass,letterpaper]{geometry}

or, if one wants a different paper size, (I'll use Letter paper sizes as example)

\usepackage[pass,paperwidth=8.5in,paperheight=11in]{geometry}

With the pass option, geometry won't change the class parameters for pagination, as it would do without it.

Note for BakomaTeX

As far as I know, BakomaTeX doesn't use pdflatex, so the

\usepackage[pass,letterpaper]{geometry}

should be the one to follow.


The geometry package might be useful here

\usepackage[paperheight=11in,paperwidth=8.5in]{geometry}

MWE:

    \documentclass{article}
    \usepackage[paperheight=11in,paperwidth=8.5in]{geometry}

    \begin{document}

    hello world

    \end{document}

you should probably use the geometry package:

\usepackage[letterpaper]{geometry}

and compile with pdflatex. If you compile with dvips and ps2pdf, pay attention to the driver settings

Tags:

Pdf

Paper Size