I will be addressing your question as a single process. The process you are
asking for is the printing of graphics and text (the same thing on the
Macintosh) to a PostScript printer using a network and print spooler, like the
AppleShare Print Server.
The first step takes place when the user selects the Print option provided from
within an application. The application has been programmed by its developer to
print its documents to a PostScript printer. It provides this by using the
Macintosh Print Manager Routines, which are a standard part of the Macintosh
Operating System.
The application uses QuickDraw and Font Manager calls to
draw to a GrafPort (display data structure). These calls create QuickDraw
opcodes, which are stored in the GrafPort and converted to actual pixel
information through QuickDraw low-level routines. Typically, the GrafPort
controls an image displayed on a screen. The Print Manager uses a special form
of GrafPort called the TPPrPort.
The TPPrPort is essentially a GrafPort that includes special data structures
and drawing routines for a print driver, like the Apple LaserWriter PostScript
driver. This enables QuickDraw to draw to a printer rather than a display
device. QuickDraw high-level draw commands generated from the application now
pass data to the selected driver. This is handled by the new low-level drawing
routines, which route the data to a print driver and is generally transparent
to the application programmer and the high-level QuickDraw commands being used
to draw to the TPPrPort.
The application, having been directed by the user to print a document, redraws
the selected document to a TPPrPort. The Print Manager, once directed to print
the document, activates the currently-selected print driver. The print driver,
previously selected through the Chooser, has its name stored in Parameter RAM
and an access identifier stored in the Device Manager's unit table. The Print
Manager uses the Device Manager to load the chosen print driver.
After the print driver loading process is completed, the driver tries to use
the AppleTalk Manager to contact the LaserWriter. In the case of an AppleShare
Print Server, where the desired LaserWriter has been "captured", the print
server answers back to the driver that it is ready.
When the Macintosh Print Server bypass option is selected, the real LaserWriter
does not appear as an option in the Chooser because during the capture phase of
the print server, the LaserWriter device type has been changed to answer only
to a special name. Essentially, the LaserWriter doesn't know it's a LaserWriter
and calls itself something else. When searching for LaserWriters, the Chooser
displays the names of network entities that answer back, when it searches for
network devices of the type "LaserWriter." A print server with a captured
LaserWriter answers the Chooser's AppleTalk lookup with the name of the
captured LaserWriter.
The print driver within the user's Macintosh receives an answer from the print
server that it is the selected LaserWriter and is ready to receive a print job.
The print driver passes this information to the Print Manager, which passes on
this information as a "No Error" to the application. After receiving a "No
Error", the application creates the document for printing. The application
draws each page to the printer document using QuickDraw commands.
The print driver receives each of the pages as QuickDraw-generated opcodes and
converts these opcodes to PostScript language commands and passes the data to
the driver. The driver passes the information through its Printer Access
Protocol routines to the AppleTalk Manager, which, in turn, delivers the data
across whatever physical AppleTalk network is connected to the user's Macintosh
to the print server.
The print server receives the PostScript commands through the AppleTalk Manager
and the governing Printer Access Protocols. The PostScript commands are stored
to disk, and the document is placed in a print queue. The print driver in the
System Folder of the print server is accessed through the Print Manager
routines on the print server.
The print server acts as an application that directly passes the PostScript
code received from the user's Macintosh to the driver. The driver contacts the
"real" LaserWriter and sends the PostScript data through the AppleTalk Manager,
adding a set of its own Special PostScript routines prior to printing the job.
These special routines let the print server keep track of the document name,
number of pages, and any errors generated by the LaserWriter.
This is an overview of the process involved when printing to a print server and
captured LaserWriter. Of course, the AppleTalk phase itself can be greatly
complicated when routers are involved, and many parts of the process have been
simplified here.