cew@mtuxo.att.com (XMP14-C.WALKER) (01/14/89)
Help! Does anybody know how to print out a MAC postscript file on a laser printer that is attached to a UNIX machine? I have generated a postscript file on the MAC using a command-k from the PRINT window and up-loaded the file to my UNIX machine via the XMODEM text file transfer program. When I send the file to my postscript printer (a QMS-PS 800 II) from the UNIX machine, nothing comes out. Is there something special that I have to do to the MAC file to print it on a general postscript printer (it has what seems to be the MAC postscript header that defines a number of postscript routines)? I have used UNIX-based packages to generate postscript files and have been successful in printing them on the QMS, so there must be something unique about the MAC file. It was generated on a MAC SE attached to a Apple LaserWriter II and using the NT/NXT icons and laserprep files. I have even generated and up-loaded the file several times to make sure it isn't a transmission error with no luck. I'm not sure what to try next. If you have solved this or a similar problem, please let me know by e-mail. Thanks, Carl Walker
bezanson@adobe.COM (Brian Bezanson) (01/17/89)
When you take a file generated by a command-F or command-K in the print dialog, it will produce proper postscript code for your application, but the command-F version doesn't include Apple's dictionaries, and the command-K version sometimes isn't too clean. So how do you print those files? My suggestion, based on what has always worked for me, is to use several different applications to do a command-K file of a very simple document (i.e. one word in MacWrite, one line in MacDraw, etc...) Then edit the files to remove the application specfic code. What you are left with are several copies of the LaserPrep prolog. Compare these files against each other. If they all seem to be identical, then I'd assume you have a good copy of the header. Then send this to your Unix machine, and prepend it to each command-F Mac file you send. Technically you should only need to download this dictionary/header info once to the laserprinter, but I'd suggest for the few extra seconds to send it in case someone has purged/reset the laserprinters memory. Hope this helps. If you have any problems with the above techniques, send me some email and I'll compile a list of areas people have problems in. I'd like to work with someone at Apple and create the definitive guide of bringing your Mac/Apple LaserPrep generated files to other machines for downloading to PostScript(tm) printers. Good luck. ------------------------------------ Brian Bezanson Adobe Systems Inc. bezanson@adobe.com
stone@hydra.unm.edu (Andrew Stone CS.DEPT) (01/17/89)
In article <219@adobe.COM> bezanson@adobe.UUCP (Brian Bezanson) writes: >When you take a file generated by a command-F or command-K in the print dialog, [Great Advice Follows] If you are running Multifinder, be sure to turn off Background Printing in the chooser, otherwise no files will be generated. ||<<++>>||<<-->>||<<==>>||<<++>>||<<??>>||<<++>>||<<-->>||<<==>>||<<++>>|| || || || || Andrew Stone ?? 2 + 2 = 5; || || stone@hydra.unm.edu <> for sufficiently large 2 || || || || ||<<++>>||<<-->>||<<==>>||<<++>>||<<??>>||<<++>>||<<-->>||<<==>>||<<++>>|| "Back where I come from we have Universities, great seats of learning, where men go to become great thinkers, and when they come out,they think deep thoughts and with no more brains than you have, but they have one thing you haven't got: a diploma" -- Wizard of Oz
gillies@m.cs.uiuc.edu (01/17/89)
Twice I have had problems printing files on our Imagen (Ultrascript) laser printer: 1. The first time, I was uploading the files in the wrong transfer mode. I use kermit IMAGE (binary) mode with Red Ryder 9.4. The sympton is that on UNIX, the lines in the files should be separated by ^M, NOT ^J, as in most UNIX text files. Either use an editor (emacs) that shows you these control characters, or "cat" the file, and you should get something that looks like a binary file. If the file prints as a bunch of short lines of postscript, then it's wrong. 2. The second time, I was using the new apple NT/NTX icons. These don't work for me. I must use the OLD laserprep icons, the ones that look like laserwriters. I use the versions from April 14, 1987. Also, check with your system administrator to make sure you're invoking postscript on your printer. Our printers support both impress and postscript, and special incantations are used to specify postscript. Later, when you get things under control, I suggest you upload the laserprep file separately. The way to do this is to make a VERY small MacWrite (or anything that prints) file, and print it using apple-K to generate postscript. Then go to your word processor, open "postscript0" as "text", and you should see something like: %%PS-Adobe ... %%Laserprep file copywrite Apple computer ... .. .. .. .. %%MacWrite .. .. your very small data .. The application name appears after %%. Laserprep is everything BEFORE these two percent signs. Put THAT on your UNIX machine. Don Gillies {1uiucdcs!gillies} U of Illinois
sbb@esquire.UUCP (Stephen B. Baumgarten) (01/18/89)
In article <219@adobe.COM> bezanson@adobe.UUCP (Brian Bezanson) writes: >Hope this helps. If you have any problems with the above techniques, send me >some email and I'll compile a list of areas people have problems in. I'd like >to work with someone at Apple and create the definitive guide of bringing your >Mac/Apple LaserPrep generated files to other machines for downloading to >PostScript(tm) printers. > >Good luck. >------------------------------------ >Brian Bezanson >Adobe Systems Inc. >bezanson@adobe.com I wish someone at Adobe would hit the people at Apple over the head. Why should this stuff remain so undocumented? There's so much misinformation going around about how to print PS files from the Mac that you'd think someone at Apple would clean things up once and for all. Worst of all, once you finally get a LaserPrep header file, you *still* can't just send it to a PS printer. You have to munge around with it some. What a pain. And as a previous poster noted, the result is not at all suitable for inclusion in other documents, since Apple uses absolute addressing. Feh. Clean this stuff up, Apple. For a company so concerned with "connectivity" of late, this really borders on the shameful. No one is asking you to dump QuickDraw for Display Postscript, but it would be nice if the Postscript you *did* generate was useable on a non-Macintosh system. And to anyone who wants the "prepfix" package which does the munging for you, let me know. It was also posted to comp.binaries.mac recently, so you might be able to get it from an archive site as well. -- Steve Baumgarten | "New York... when civilization falls apart, Davis Polk & Wardwell | remember, we were way ahead of you." cmcl2!esquire!sbb | esquire!sbb@cmcl2.nyu.edu | - David Letterman
rob@ccsrd11.UUCP (Robert Sleator) (01/18/89)
The LaserPrep file (the PostScript prolog prepended to most Mac files sent to the LaserWriter) contains code which is more or less equivalent to: statusdict /product get % returns string with product name << is this equal to the string (LaserWriter) (e.g., are you a LaserWriter ?) >> {eexec}{flushfile} ifelse % if LW do eexec, else do flushfile . . . << a bunch of hex >> . . . %%EOF << begining of script part of file, which contains your text >> The problem is that when you save this file with Command-K there is no ^D next to the %%EOF comment. If you then run the file on a printer other than a LaserWriter it executes the flushfile rather than eexec, and flushes to the end of the job. The solution is to edit the file and insert a control-D next to the %%EOF comment (and make sure that the "exitserver" line is not commented out). Alternatively, if you don't want the prolog downloaded permanently, you can comment out the exitserver line and delete everything from the first line that resembles this: currentfile ok userdict /smooth known not and{eexec}{flushfile}ifelse down to the %%EOF line. This should be mostly hex. NOTE: The above applies to version of the LaserPrep file before version 67. Version 67 may not have this problem. It does contain a couple of new examples of non-portable code, though.
liam@cs.qmc.ac.uk (William Roberts) (01/18/89)
There are a lot of problems here, most of which stem from the "I own the world" attitude expressed in the Macintosh software and some from the assumption that everyone is connected to their printers via AppleTalk. First things to do include 1) strip out the line in the header which mentions setdefaulttimeout 2) remove the line that begins with ok, since this will do stupid things to the comms hardware in the LW that you don't want. A bit harder - perhaps a small C program 3) Convert all characters with bit 7 set to be \213 or whatever using the PostSCript excape convention for octal characters This one is unavoidable 4) Don't generate any output containing bitmaps in binary form The reason for 4) is that a simple serial line connection requires embedded control information with the data, whereas an AppleTalk connection uses a packet protocol and clearly separates control information from data. Your binary data is bound to contain junk like ctrl-D and ctrl-T which are ALWAYS, ALWAYS, ALWAYS treated as control information when talking to a LaserWRiter through the 25 way connector. Classic ways to fall foul of 4) include * selecting "Faster Bitmap Printing" on the standard Page Setup * using Aldus FreeHand * using Pagemaker 3.0 with any driver except Linotronic 100/300 and those are just the ones I've had problems with in the last week. Oh yes, you will probably need to stuff the file through fold, because it contains a few lines of over 2000 characters - fortunately these are all hex data, so extra linefeeds are ignored (bitmaps should be done this way). You will find it useful download the Adobe ehandler.ps routine before you start, just in case you find other garbage that I've forgotten. Why are LaserPrep files always written by people with no love for (or understanding of) PostScript? -- William Roberts ARPA: liam@cs.qmc.ac.uk (gw: cs.ucl.edu) Queen Mary College UUCP: liam@qmc-cs.UUCP LONDON, UK Tel: 01-975 5250