Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am attempting to finish my LaTeX project, and I can't seem to get the PDF to compile to the right size no matter what I do. In my .cls file I have this set:

\paperheight 11in
\paperwidth 8.5in

But no matter what I change it to, it compiles to about 8.25x11.7".

I can post my .cls files or anything else for that matter if someone knows hat I am doing Here is my .cls file: usfmanus.cls - I am using BakomaTex Word for my editor. When I compile my PDF, I am still getting strange dimensions. I really appreciate this, thank you.

share|improve this question
3  
use the geometry package for such issues. –  phimuemue Oct 18 '11 at 21:51
1  
It is always best to compose a MWE that illustrates the problem including the \documentclass so that those trying to help don't have to recreate it. –  Peter Grill Oct 18 '11 at 22:11

4 Answers 4

up vote 23 down vote accepted

The correct parameters to set are \pdfpaperheight and \pdfpaperwidth:

\pdfpaperheight=11in
\pdfpaperwidth=8.5in

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

\usepackage{ifpdf}
\ifpdf
  \pdfpaperheight=11in
  \pdfpaperwidth=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.

share|improve this answer

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}
share|improve this answer

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

share|improve this answer
    
How do I compile with pdflatex? I am new at this and have been using BakomaTex Word. –  naspinski Oct 18 '11 at 22:14
    
I am not familiar with BakomaTex. Just open a command window in your working directory (where the mydocument.tex source is) and type at the prompt: C:\mydirectory>pdflatex mydocument.tex and the respective mydocument.pdf with proper size will be created. –  pluton Oct 19 '11 at 1:07

Try the following:

\usepackage{geometry}
\geometry{letterpaper}

Here you'll find the documentation for the geometry package.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.