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.

  • 5
    use the geometry package for such issues.
    – phimuemue
    Oct 18, 2011 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. Oct 18, 2011 at 22:11

7 Answers 7


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


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


The geometry way is better:


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


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


should be the one to follow.

  • 2
    Instead of 'paper' in \pdfpaperheight and \pdfpaperwidth, shouldn't it be 'page'? Jan 29, 2018 at 7:23
  • @cyberSingularity They were changed in the meantime. Fixed.
    – egreg
    Jan 29, 2018 at 7:32

The geometry package might be useful here





    hello world

  • 3
    When I compile, the finished pdf still looks like it's 8.5x11, even when I change the dimensions to paperheight=1in, paperwidth=8.5in. Why is this and how can I get a generated pdf that actually looks like it's 1 inch tall and 8.5 inches wide? Aug 20, 2019 at 17:56

you should probably use the geometry package:


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

  • How do I compile with pdflatex? I am new at this and have been using BakomaTex Word.
    – naspinski
    Oct 18, 2011 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, 2011 at 1:07

Try the following:


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


Here is method without using a package:

\pdfpagewidth 8.5in
\pdfpageheight 11in
  • BUt this does not work when i use \includepdfmerge[fitpaper]{./test.pdf, 497} The page size is decided by the pdf page size due to fitpaper. Using fitpaper does not respect the \pdfpagewidth=500pt \pdfpageheight=500pt It changes the size of the paper. I am expecting fitpaper to fit into the 500pt x 500pt page size and later align it in the top left corner.
    – Santhosh
    Aug 1, 2020 at 8:18

This might require the vmargin package, but using:


works too.


If you are using the layout package, you should call \usepackage{layout} after setting all your page parameters or \layout won't display correctly.

I just found out that if I include, \usepackage{pdflscape} It automatically parses the pdf page size correctly; even if you don't have any landscape pages.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .