Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!ukma!wuarchive!m.cs.uiuc.edu!gillies From: gillies@m.cs.uiuc.edu (Don Gillies) Newsgroups: comp.lang.postscript Subject: Re: Ps From a Mac Keywords: Macintosh Postscript Message-ID: <1991Jun1.013050.17002@m.cs.uiuc.edu> Date: 1 Jun 91 01:30:50 GMT References: <1991May31.035526.28632@cerberus.bhpese.oz.au> Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL Lines: 109 I get so many requests for this information that I am posting it again. If you are having trouble printing postscript on a non-apple printer, with laserwriter drivers 5.0, 5.1, 5.2, 6.0, or 6.1, then read onward. This file is called "imagen-postscript.txt" lives in the directory [sumex]tips>. Good luck! -- Don Gillies ---------------------------- cut here ------------------------ I posed a question in these newsgroups on March 23, asking how to get postscript files prepared on a Mac, to print properly on an Imagen 2308S running 4.0 software with Ultrascript. This posting provides the solutions that were suggested by Imagen software support, and several net readers. If you have a laserwriter, you need not modify the laser prep at all. However, if you have a non-Apple printer (such as imagen, or something else), read onward. The problem in printing is in the dictionary provided by Apple. The result of doing an option-K on your Mac, just after clicking on OK in the print dialogue box, is a postscript file which contains Apple's postscript dictionary, followed by the output of the application you created a drawing with. The dictionary, which is the header of the file, looks like: %! %%Title: "Laser Prep -- The Apple PostScript Dictionary (md)" %%Creator: Apple Software Engineering %%CreationDate: Thursday, March 19, 1987 %{appledict version #68 0 % (c) CopyRight Apple Computer, Inc. 1984,1985,1986,1987,1988 All Rights Reserved. %%EndComments %%BeginProcSet: "(AppleDict md)" 68 0 . . . %%EndProcSet %%EOF There are two ways of dealing with this problem. The first and definitely the simplest, is simply to use Imagen's Apple compatibility dictionary corresponding to the version of LaserPrep your Mac puts out. For LaserPrep 5.2, that means replacing the entire dictionary shown above with the two lines: %! (dictv52.ps)run "dictv5.ps", "dictv51.ps", and "dictv52.ps" are postscript dictionaries which Imagen provides on their hard disk; you can use your Imagen disk manager program to verify they're there. The second (and more involved) way of dealing with the problem, is to fixup Apple's dictionary. If you have a non-Imagen, or non-Apple Laserwriter, then use this method. Two fixups are needed. The first fixup is at approximately line 9 of the dictionary, which reads: statusdict begin waittimeout 300 lt{0 60 300 setdefaulttimeouts}if end This line attempts to set "statusdict" operators that are normally protected, which results in an "invalidaccess" error on Imagen. (I presume the LaserWriter must be executing something behind our backs to get this to work as is.) To fix it, either (1) place a "serverdict begin exitserver" command before the above line, or (2) comment out the above line by placing a '%' before it. The second needed fixup is at approximately lines 10 & 11 of the dictionary. Get rid the lines of the strings "//setrealdevice" and "//execjob". I suggest you delete these strings (along with their line termination character, either a carriage return (^M, ASCII 015) if the file was uploaded in raw/binary mode, or newline (^J, return key on UNIX, ASCII 012) if the file was uploaded in text translation mode. Or you can comment them out: prepend a '%' (indicates comments) to each command and append and appropriate ^J or ^M, depending on what is terminating the rest of the lines in the file. (No, I don't know what "setrealdevice" and "execjob" do, they aren't in Adobe's ps ref manual, appendix D.6 - SYSTEM PARAMETERS. Must be Apple-specific stuff. If you know, please tell me too.) I should probably mention that several persons pointed me at host sumex-aim.stanford.edu, which contains contributed programs for the Mac. Specifically, they suggested that I look at "macps-prepfix.shar", which contains programs "macps" and "prepfix", one of whose functions is to prepend a standard Apple dictionary to a postscript program on a unix host, before sending it to a LaserWriter. These programs aren't very useful with an Imagen, as it's a lot easier just to add that "(dictv52.ps)run" command to your postscript files, before spooling them to Imagen. ****** I should probably also mention that one of the first problems we encountered with postscript on our Imagens, had to do with "invalidaccess" error messages not related to the above dictionary problems. Imagen already had a fix for this, which involves downloading two files to your hard disk, "2020.ps" and "startup.ps", which change some systemdict parameters ... related to memory allocation, I believe. If you have an Imagen, plan on doing much future postscript work, and haven't yet applied this fix, you can get it by calling Imagen or e-mailing me. -- -------- Ed Arnold * NCAR (Nat'l Center for Atmospheric Research) * Mesa Lab PO Box 3000 * Boulder, CO 80307-3000 * 303-497-1253(w) * 303-494-6949(h) era@ncar.ucar.edu (128.117.64.4) * {ames,gatech,noao,...}!ncar!era --