PaperSize When Using PDFLatex

Keywords: pdftex pdflatex papersize vmargin vpage

When compiling a document using pdflatex (under the default installation of teTeX) the papersize (page size) may be set incorrectly if calls to the Vmargin or Vpage packages are used.

The resulting page size will normally be set to an A4 default (210x297mm or roughly 8.24x11.71in) with appropriate margins. This behavior is caused by page defaults both in the pdftex configuration file and in the Vmargin style file. To correct this you should perform the following modification:
In pdftex.cfg ($TEXBASE/texmf/pdftex/config/pdftex.cfg) remove or modify the lines:

page_width 210truemm
page_height 297truemm

So that they correspond to your desired default pagesize. An example entry for letter sized paper would read:

page_width 8.5truein
page_height 11.0truein

Additionally in the Vmargin style file ($TEXBASE/texmf/tex/latex/misc/Vmargin.sty) at or around line 225 you should change the following default settings so that they reflect the correct default paper size and margins:

%
% DEFAULTS:
%
\setpapersize{A4}
\setmarginsrb{35mm}{20mm}{25mm}{15mm}{12pt}{11mm}{0pt}{11mm}

For example changing this to read:

%
% DEFAULTS:
%
\setpapersize{USletter}
\setmarginsrb{1in}{1in}{1in}{1in}{0pt}{0mm}{0pt}{0mm}

Will set up the default page layout to be the standard USLetter (8.5x11.0in) with 1 inch margins and no headers or footers.

It should be noted that for some reason calls to \setpapersize{} that are made within the document seem to be ignored by pdflatex. Even so, it is advised that you include a proper \setpagesize{} and \setmarginsrb{} call so that pagesize can be controlled when building documents with the standard latex package.

If you are constructing your PDF files via conversion of a postscript document that was produced using dvips, then you should additionally check to make sure that your postscript config file ($TEXBASE/texmf/dvips/config/config.ps) is set up to default to a USLetter (8.5in by 11.0in) bounding box. If you see the following:

@ A4size 210mm 297mm
@+ %%PaperSize: A4

@ letterSize 8.5in 11in

@ letter 8.5in 11in
@+ %%BeginPaperSize: Letter
@+ letter
@+ %%EndPaperSize

In the config.ps file then the A4 bounding box is used incorrectly in place of the letter bounding box, resulting in documents that are typeset to a USLetter layout but are generated with an A4 canvas. To correct the situation comment out the first two A4size lines so that the file appears as:

% @ A4size 210mm 297mm
% @+ %%PaperSize: A4

@ letterSize 8.5in 11in

@ letter 8.5in 11in
@+ %%BeginPaperSize: Letter
@+ letter
@+ %%EndPaperSize

This will now generate the proper bounding box for letter defaults.


Andrew J. Norman