Article View: comp.lang.postscript
Article #183Re: Needed: Legal (A4 size) portrait Prologue
From: Robert A. Lerche
Date: Mon, 03 Aug 1992 15:20
Date: Mon, 03 Aug 1992 15:20
52 lines
2206 bytes
2206 bytes
rao@hsi.com (Ananth Rao) writes:
>>Does anyone have a Portrait Prologue to output postscript to
>>Legal (A4 size) paper?
...
>Also to access our HP laserjet IIIsi's lower tray which holds the legal size
>paper, I had to include the following code toward the bottom of a2ps.c and
>define the variable LEGAL in the above Makefile line with '-DLEGAL'.
>
> #ifdef LEGAL
> printf("statusdict begin\n");
> printf("1 setpapertray\n");
> printf("end\n");
> #endif
>
>I'm sure there must be simpler solutions than this, but we use this
>combination extensively especially for landscape mode printing on legal paper.
Aack! Going beyond device-dependent PostScript we now have an example
of installation-dependent PostScript. The above code assumes that a
legal tray is loaded into tray position #1.
May I recommend...
/languagelevel where
{ pop languagelevel 2 eq
{ 1 dict dup
/PageSize [612 1008] put
setpagedevice
}
{ statusdict begin legaltray end
}
ifelse
}
{ statusdict begin legaltray end
}
ifelse
Actually, level 2 printers typically include "legaltray" as an alias
for "<</PageSize [612 1008]>> setpagedevice", so just "statusdict
begin legaltray end" is good enough on all printers, but the example
also illustrates the incantation for detecting whether one is on a
level 2 printer.
By the way, A4 paper is not the same as legal paper. Legal is 8.5" x 14",
A4 is 8.27" (210 mm) x 11.69" (297 mm). Statusdict also contains an
"a4tray" procedure.
These procedures return errors ("configurationerror" from
"setpagedevice", or "rangecheck" from the "...tray" procedures) if the
appropriate tray is not loaded.
Technical Details
Message-ID:
<ral.712855238@panda>Path:
arc1-ca.pugleaf.net!sparky!uunet!sun-barr!news2me.ebay.sun.com!exodus.Eng.Sun.COM!sun!imagen!panda!ralReferences:
<1992Jul21.165027.17243@porthos.cc.bellcore.com> <Bs45Ez.Fqu@hsi.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!news2me.ebay.sun.com!exodus.Eng.Sun.COM!sun!imagen!panda!ral From: ral@imagen.com (Robert A. Lerche) Newsgroups: comp.lang.postscript Subject: Re: Needed: Legal (A4 size) portrait Prologue Keywords: A4 Message-ID: <ral.712855238@panda> Date: 3 Aug 92 15:20:38 GMT References: <1992Jul21.165027.17243@porthos.cc.bellcore.com> <Bs45Ez.Fqu@hsi.com> Sender: news@imagen.com Organization: QMS, Inc. / Imagen Division Lines: 52