Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!rpi!crdgw1!uunet!rosie!pgraff From: pgraff@next.com (Peter Graffagnino) Newsgroups: comp.sys.next Subject: Re: DPS dictfull error with Win3 PS files Keywords: postscript, windows, DPS Message-ID: <456@rosie.NeXT.COM> Date: 7 Apr 91 20:05:30 GMT References: <1537@cgh.com> <1542@cgh.UUCP> Sender: news@NeXT.COM Organization: Next Computer, Inc. Lines: 31 Nntp-Posting-Host: los.next.com In article <1542@cgh.UUCP> paul@cgh.com (Paul Homchick) writes: >In using the postscript driver for the NEC, windows was including the >following PS sequence: > > {statusdict begin 2 setpapertray end }stopped pop > >If there is no setpapertray (and with a NeXT printer, there is not), >statusdict is left on the dictionary stack. statusdict is big enough >that the program soon runs out of dictionary room and bombs. Removing >the above sequence solved the problem. > >My correspondent mentioned that "There are better ways to safely >execute a PS operator if it [might] not be present". Now, I'm >curious, does anyone know the correct way of doing this? > The best way to conditionally execute operators that may not exist is to use the `known' operator. In the example above, the most robust implementation is: statusdict /setpapertray known { 2 statusdict /setpapertray get exec } if Hopefully Microsoft will include this in a future release of their Windows driver. Peter Graffagnino Graphics Software NeXT Computer, Inc.