[tex-live] dvips config.ps letter/a4

Karl Berry karl at freefriends.org
Sun Jun 3 01:12:40 CEST 2007

After consulting with Tom and Akira and Dick, I've changed the a4 and
letter paper size definitions in the dvips config.ps to execute the
setpagedevice operator if it exists, else execute the a4/letter
operators if they exist, or do nothing if nothing is available.

I also changed the a4size and letterSize paper size definitions in
config.ps to be identical to a4 and letter.

The new file is at
If anyone else feels like testing, please do.

(I also changed texconfig to use the names a4/letter instead of a4size
and letterSize, since they are simpler.)

The reason for all this is so that ps2pdf and maybe other distillers
have a better chance of working.  In the past, it would not propagate
the correct paper size through to the pdf without more work.


% 0 0 595 842 is the right bounding box that applications expect
% for A4.  Since dvips always rounds up, choose something slightly
% smaller for our paper size.

@ a4 209.9mm 297.04mm
@+ ! %%DocumentPaperSizes: a4
@+ %%BeginPaperSize: a4
@+ /setpagedevice where
@+  { pop << /PageSize [595 842] >> setpagedevice }
@+  { /a4 where { pop a4 } if }
@+ ifelse
@+ %%EndPaperSize

@ letter 8.5in 11in
@+ ! %%DocumentPaperSizes: Letter
@+ %%BeginPaperSize: Letter
@+ /setpagedevice where
@+   { pop << /PageSize [612 792] >> setpagedevice }
@+   { /letter where { pop letter } if }
@+ ifelse
@+ %%EndPaperSize

More information about the tex-live mailing list