[tex-k] dvips: BeginPaperSize in postscript DSC

pierre.mackay pierre.mackay at comcast.net
Fri Nov 10 03:13:36 CET 2006

Jean-François Mertens wrote:

>On 09 Nov 2006, at 22:57, Karl Berry wrote:
>>    %%BeginPaperSize:
>>    %%EndPaperSize
>>    The comments %%BeginFeature: and %%EndFeature should be  
>>What is the exact syntax, please?
>>I wonder what this change would break, ie, what (if anything) uses the
>>begin/endpapersize.  Is it possible to use both?
>>    Similarly, the %%Papersize comment is (loc. cit., p 101)
>>    to be replaced (since 1992) by a %%PageMedia comment.
>>Is the syntax for %%PageMedia the same, that is,
>>%%PageMedia: Letter
>>Or did Adobe make it more complicated?
>>And again, would it work to add the pagemedia comment to config.ps in
>>addition to the %%PaperSize, or does it have to replace?  I would be
>>worried that other software might still want %%PaperSize, however  
>>old it
>>is.  (Even if Adobe likes to be incompatible, we don't have to.)
>>I'm not sure why the "@ A4Size" has a %%PaperSize comment, but the
>>"@ letterSize" doesn't.  Tom(s)?
>I'm worried that the cited document refers to PostScript level 3,
>ie, for ps files starting with
>instead of dvips's
>probably (?) dvips's comments are still correct for Postscript level  
>2 ..
>There might be a reason to upgrade dvips to use level 3 _ I have
>no idea eg if there are still level 2 printers around _
>but I would think this should be an independent issue.
>There is a good reason to argue that a ps file _ just like a dvi file _
>should be a reliable way for storing electronically, and hence should
>continue to be interpreted correctly (at least by a "universal  
>like ghostscript) for many decades at least...
>In particular, that ghostscript should read correctly the first line,
>and interpret the comments accordingly _ and according to its
>own doc :
>"<prefix>/share/ghostscript/8.54/doc/Use.htm#Paper_size" specifies :
>"Individual documents can (and often do) specify a paper size, which
>takes precedence over the default size. "
>1) to my mind, the main culprit is ghostscript
>2) maybe still dvips's maintainers can do something to help  
>if really needed, after consultation with them ..
>3) there might be a reason to consider whether and when dvips would  
>to level 3 _ but this should be independent.
>But it is crucial that the whole (la)tex + company setup for setting  
>continues to function properly, especially in the crucial chain tex- 
>dvips-ps2pdf ..
>Jean-Francois Mertens
>tex-k at tug.org
I don't find either the 2.1 %%PageSize comment or any of its friends in 
the output of DVIPS.  What I do find is
a  /PageSize . . . . . def. which I suppose is generated from the 
%%PageSize comment line.  I haven't yet had time to
try putting in %%PageMedia to see what happens, but maybe I can get to 
that tomorrow.  It doesn't seem to me that
Ghostscript is at fault here, because at least  in DVIPS --> Ghostscript 
-> ps2pdf,   Ghostscript never sees the %%Pagesize

I remember that when I spent a while in Italy a few years ago, I had to 
wrestle with the config.ps for a while to make
A4 work.  But I was lazy, I just wrote a separate config.ps file.

Pierre MacKay

Pierre MacKay

More information about the tex-k mailing list