[comp.sys.mac] UNIX & LaserWriters

abbott@dean.Berkeley.EDU.UUCP (02/17/87)

Thanks to all the people who responded to my query.  As interest seems high
I've decided to post the results.  There seem to be three approaches to
dealing with the problem:  1.  Run the connections from the Mac and Unix
systems both through some sort of switching device.  2.  Upload postscript
files to the Unix system and print these on the LaserWriter.  3.  Use a network
of some sort which allows both systems access to the LaserWriter.

#1 is a but clumsy but certainly works.  The major problem here is that 
any time one wishes to switch from one system to the other it is necessary
to power-cycle the LaserWriter.  

#2 is much more convenient than 1 but still not ideal as it is not transparent
to the users.  I'm hoping to allow unsophisticated users access to the LW
from the Mac and this does require several steps.

#3 would certainly be the best solution but currently I can find no networking
software that will allow it.

So, currently this leaves option #2, uploading Mac-generated postscript
to the UNIX system.  Fortunately there seems to be some very good software
out there for just this.  

*********************************
The TOPS package, from Centram West in Berkeley, was suggested by Bob Berger,
Paul Calamai, and Barry Smith.
(Note that recent news here says that 3COM has just purchased Centram,
and that Apple's new file server protocol was developed in cooperation
with Centram.) from Paul Calamai

The Centram people were very informative and helpful when I called with
my questions.  The person I first talked with did not have the technical
expertise to answer my questions but quickly referred me to someone who
did.  From talking to them and reading their literature TOPS looks
like an attractive product.  Unfortunately the current incarnation
doesn't allow the UNIX machines access to LWs on the network.  They
are researching this but as of yet it isn't doable.  

*********************************************
From Brian H. Powell
		UUCP:	{ihnp4,seismo,ctvax}!ut-sally!brian
		ARPA:	brian@sally.UTEXAS.EDU

     I wrote some programs for just this sort of thing.  They are based
around a program called paintps, which is like paintimp; given a MacPaint
file as input, it creates PostScript which it can send to the LaserWriter.
(The advantage of paintps over generating the PostScript on the mac and
transferring it to the unix machine is one of size.  A typical MacPaint
picture is 20K.  Typical PostScript code for that picture is >100K.)
     To get this to work, it is necessary to prepend the LaserPrep which
defines several Apple PostScript subroutines.  In a normal LaserWriter
environment (i.e., dedicated to Macintosh printing), this LaserPrep is
downloaded into the printers "Virtual Memory" (which is just RAM with a
confusing name.)  This VM stays around between jobs, so the Prep is downloaded
only after rebooting.  In a typical UNIX environment, the RAM spent keeping the
LaserPrep around cannot be forfeited.  TeX jobs, with their fonts, are
prime examples of memory-intensive PostScript jobs.  Most will fail if the
Apple LaserPrep is installed.  To get around this, Brian Reid (@glacier?)
modified the LaserPrep so it could be prepended to Mac jobs without
downloading its subroutines into the LW VM.  I, with the help of Ron
Hitchens (hitchens@sally), modified it to include Apple's smoothing
algorithms for bitmaps (e.g., MacPaint pictures.)  It was at this time that
I wrote paintps.

     Our setup:  paintps, a C program, pipes its output to a shell script
"maclaser".  This shell script simply calls lpr with the -f option.  (-f is
for fortran mode, which we never use with our lw.)  (e.g., "maclaser -Plw file"
turns in to "lpr -f -Plw file".)  We use the TranScript package from Adobe to
provide the UNIX drivers for ditroff, etc.  (The TranScript package is not
required.)  Whenever output gets sent to a LaserWriter, the TranScript shell
scripts determine what kind of output it is (DVI, ditroff, mac, etc.) and call
the proper programs.  In the release version of paintps/maclaser, this script
prepends the laserprep to the mac PostScript code and sends it to the
printer.  The Mac PostScript code must be run through a filter to escape
8-bit characters.  (The unix printer driver clears the eighth bit.)

     The program in its original release form is available from me via mail
or anonymous ftp from sally.utexas.edu as ~ftp/mac/paintps.shar or from
sumex-aim.stanford.edu as <info-mac>unix-paintps.shar.  The release version
is about 18 months old, so it predates the current LaserWriter driver.
It is intended to be used with LaserWriter driver 1.2, which came with
Finder 4.1.

In summary:     
	... paintps allows you to upload MacPaint pictures to the unix machine
and print them there.  Maclaser (the shell script used by paintps) will print
any PostScript that came from the mac.  You can get the mac to, instead of
sending the PostScript commands directly out the printer/AppleTalk port,
dump the PostScript to a file on the disk.  You can then upload
the PostScript file to a unix machine and use maclaser to print it.

*******************************************
From munnari!rpepping.oz!RAY@seismo.CSS.GOV Sun Feb  1 05:40:51 1987

Yes there is.  You could use a Kenetics Box and suitable PD spoolers or
use a dedicated small Mac (128K) together with LASERGATE from the
University of Tasmania, PO BOx 252C, GPO, Hobart, Tasmania, 7001.
LaserGate costs about $40Aust.
Just be careful how your VAX generated postscript. Too many fonts cause
Font Definition file overflow in the laserwriter. Regards.

*******************************
   We have a Mac Plus hooked up to our laserwriter, which is shared with 8
Sun workstations on an ethernet.  We simply plug the Mac into the AppleTalk
port of the laserwriter and hook up the Suns through the serial port.
The printer is usually set to 9600 baud in order to serve the Suns.
Whenever we want to print with the Mac, we just switch the laserwriter from
9600 to AppleTalk.  You must be sure to turn off the laserwriter before you
switch to AppleTalk, and again before you switch back.  This can get a bit
tedious if you have heavy printing demands on both sides, but I understand
that there is now a gateway that will allow you to connect an AppleTalk
network directly to the ethernet.  Hope this helps.
-- 
Jim Mihori
Rand Corporation
Washington, D.C.
ARPA: mihori@rand-unix.ARPA

maclab@reed.UUCP (02/18/87)

I wrote a public domain program called PSPrinter, which allows you to
send Postscript files over Appletalk your LaserWriter.  All you need
to do is download the Postscript file from your Mainframe to your Mac,
then run the desk accessory to print your files.  PSPrinter has been
sent to the moderator of mod.mac.sources/binaries, so it should be appearing
on the net sometime in the near future.

Scott Gillespie
Reed College

dk1z#@andrew.cmu.edu.UUCP (02/18/87)

   I missed the original article, but I gather that you're trying to print to
the LaserWriter from both a UNIX system and from a Mac. If this is indeed
what you want to do, you should pick up the CAP distribution from Columbia.
Basically, it will accept print requests from Macs by pretending to be a
LaserWriter, spools the job through lpr and then prints the file to the
LaserWriter with a filter.  Needless to say, you can just toss your
Postscript file on the UNIX system at the filter and it will get to the
LaserWriter as well. This is all done by implementing PAP and everything
below it for UNIX. I believe that you can pick up a copy via anonymous ftp
from SUMEX-AIM and the info-mac archives there.

  You need a Kinetics box to hook the UNIX machine to the AppleTalk network
as well. If nothing else, the Kinetics box allows all sorts of other nice
things.

-David Kovar

joel@gould9.UUCP (02/18/87)

The latest word is that Centram is merging with Sun.  This story said
the 3Com merger fell through, and I've seen nothing since to contradict it.
-- 
	Joel West			     MCI Mail: 282-8879
	Western Software Technology, POB 2733, Vista, CA  92083
	{cbosgd, ihnp4, pyramid, sdcsvax, ucla-cs} !gould9!joel
	joel%gould9.uucp@NOSC.ARPA

phcalamai@water.UUCP (02/18/87)

>(Note that recent news here says that 3COM has just purchased Centram,
>and that Apple's new file server protocol was developed in cooperation
>with Centram.) from Paul Calamai
>
Well, I thought that Centram and 3COM were merging but the latest is
that Centram and Sun Microsystems are merging. The people at Centram
were a bit vague when I called but they implied that the merged (if,
or when, it occurs) will be a very positive thing with respect to TOPS
and that other Unix machines would undoubtedly be supported by TOPS in
the future.

Cheers. 

kah120@ihlpe.UUCP (02/20/87)

[]

With all this discussion about mac --> UNIX --> LaserWriter, I am wondering
about using a HP LaserJet from UNIX to print MacPaint files.  I would like
to download from  the Mac to a 3b2 and then print to the LaserJet.  I have
no networking capabilities to the 3b2 other than dial up.  If anyone has done
this I would like to hear more.

                                          Thanks,
                                          Ken Heitke   ihnp4!ihlpe!kah120

sbb@esquire.UUCP (03/02/87)

I've seen a number of articles about printing PostScript files generated from
within a Mac application (by pressing cmd-D or cmd-K), but I can't seem to
get the resulting file to print correctly on the LaserWriter we have at work.

cmd-D gets you a nice PostScript file, and cmd-K prepends some sort of header
(presumably stuff from the Laser Prep file), but I just get errors when I
try to print the result.  Come to think of it, the file created from cmd-K
doesn't start with "%!", so it isn't even an official PostScript file, is it?

Has anybody been able to do this?  Could you post the answer (since I'm sure
there are others with this problem)?  If you do, please include even the
"obvious steps" since some of us are PS novices.

Thanks ever so much...

                                  - Steve Baumgarten
                                    Davis Polk & Wardwell
                                    {ihnp4, seismo}!cmcl2!esquire!sbb