[pdftex] controlling a4/letter from tex?

Ross Moore ross at ics.mq.edu.au
Thu Mar 18 23:35:59 CET 2004

Hi Karl,

On 19/03/2004, at 8:36 AM, Karl Berry wrote:

> This seems like it is probably a FAQ, but I could not find any Q (or 
> A).
> For pdftex, is it possible to control the final page size from within 
> TeX?
> Or is it necessary to set page_width and page_height in pdftex.cfg?
> Setting \pdfpagewidth and \pdfpageheight made no difference.  (This is 
> a
> plain TeX document, namely, the TUG membership form at
> http://tug.org/forms/current/memberapp.tex.)

Since this document handles the \shipout itself,

all you need to do is adjust the \ht \wd and \dp of
the \box\mybox , and perhaps adjust the \voffset and \hoffset
to position the contents appropriately.

In pdftex the \pdfpagewidth  and  \pdfpageheight  set
the /MediaBox (I think), whereas the /ArtBox or /CropBox have
a greater effect on what you see on-screen in a PDF browser.
That is, changes to \pdfpagewidth  and  \pdfpageheight  may
affect *where* the contents occur on the paper, when you print
the PDF, but need not affect what you see on-screen.

Hope this helps,


> Since texexec has a --mode option to set this, I guess it is possible,
> but I could not figure out what texexec and/or ConTeXt is doing as a
> result of that option (and it didn't change my output, either).
> In any case, if it's not possible to change the page size from within
> TeX, I suggest a command line option to allow loading an arbitrary
> config file.  This would be more convenient than having to create a
> new directory with the necessary pdftex.cfg in it, which is what I
> resorted to.
> Sorry if such an option is already there, I didn't see it in the --help
> output.
> This is with pdfTeX (Web2C 7.5.2) 3.141592-1.11a, from TeX Live 2003.
> Thanks,
> karl
> _______________________________________________
> pdftex mailing list
> pdftex at tug.org
> http://tug.org/mailman/listinfo/pdftex
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia                                  fax: +61 +2 9850 8114

More information about the pdftex mailing list