AmendHub

Download: |

thecloud

/

SimpleSpooler

 

(View History)


Virtual AppleTalk printer/spooler for classic Mac OS

thecloud   Simple Spooler 0.3 release

Name Last Commit Last Modified
LICENSE Simple Spooler 0.1 release 2 days ago
Logging.c Simple Spooler 0.1 release 2 days ago
Logging.h Simple Spooler 0.1 release 2 days ago
PAP.c change FilterData to handle split sequences, detect reverse linefeed 2 days ago
PAP.h refactor StartSpooler code to allow auto-running server 2 days ago
PrintQueue.c FilterData tweaks yesterday
PrintQueue.h Simple Spooler 0.1 release 2 days ago
QueryParser.c Simple Spooler 0.1 release 2 days ago
QueryParser.h Simple Spooler 0.1 release 2 days ago
README Simple Spooler 0.3 release yesterday
SpoolFiles.c Simple Spooler 0.1 release 2 days ago
SpoolFiles.h Simple Spooler 0.1 release 2 days ago
Spooler.c refactor StartSpooler code to allow auto-running server 2 days ago
Spooler.make Simple Spooler 0.1 release 2 days ago
Spooler.r refactor StartSpooler code to allow auto-running server 2 days ago

README
## Simple Spooler 0.3 ##
Copyright (c) 2026, Ken McLeod.

This application acts as a virtual printer on an AppleTalk network, receiving
print jobs using PAP (Printer Access Protocol) and spooling them to files. It
can either print immediately or at a later scheduled time, sending the print
job to a locally-connected ImageWriter printer which would otherwise not be
visible on the network.

Simple Spooler is freeware. You may use and distribute the software at no
charge. See the LICENSE file for conditions on your use of the source code.


**System requirements**

System 6.0 or later (up to Mac OS 9.2.2) is currently required to run Simple
Spooler. This software has been tested on System 6.0.5, 7.0.1, and 7.5.3, as
well as Mac OS 8.6 and 9.2.2.

AppleTalk must be set to Active in the Chooser. You should have enough free
disk space on your startup disk to accomodate the print jobs you expect to
receive. ImageWriter spool files occupy less space than LaserWriter spool
files, but all can add up if they are not being processed immediately.


**Starting the spooler**

After opening the application, select "Start Spooler" from the Control menu.
A dialog will present the following options:

* Printer name
    Type a name for the print spooler, which you can think of as a virtual
    printer. This name will appear on the network and can be selected by other
    users as an AppleTalk printer in the Chooser.

* Auto-run at launch
    Select this checkbox if you want the spooler to run automatically when the
    application opens, rather than needing to manually click Start. This allows
    for unattended server operation, e.g. by placing an alias to Simple Spooler
    in your Startup Items folder on System 7.0 or later.

* Virtual printer type
    Select one of the icons representing LaserWriter, ImageWriter LQ, or
    ImageWriter to create a virtual printer of that type. For an ImageWriter or
    LQ, you can additionally select whether the printer is seen as having a
    color ribbon or a sheet feeder. The "IW1 compatibility" checkbox improves
    compatibility with the original ImageWriter by removing newer printer
    control codes that only the ImageWriter II understands. The "Skip Reverse
    Feeds" checkbox strips control codes that would cause your printer to roll
    the paper backwards; selecting this can prevent misprints and paper jams.

* Print to this port
    Select the icon for the local serial port where your ImageWriter printer
    is connected. If the Enabled checkbox is selected, spooled print jobs will
    automatically be printed to this port once they have been received, as long
    as the current time is within the scheduled printing hours. The default
    setting is 12 AM - 12 AM (or 0 - 24), an unrestricted span of 24 hours
    starting at midnight.

You can restrict printer use by using the up/down arrow control to change the
start and end times; for example, you may only want printing to occur during
business hours and not at night. If the spooler receives a print job outside
the specified hours, it will be printed later once the start hour is reached.
Uncheck the Enabled box if you don't have a local printer connected, or if you
just want to hold all jobs for printing at a later date.

Click Start to begin running the spooler. This registers the printer name you
provided on the AppleTalk network, listens for incoming print jobs, and
prepares to print any previously spooled jobs in its spool folder.


**Stopping the spooler**

The spooler can be stopped by selecting "Stop Spooler" from the Control menu,
or by quitting the application.


**Printing to the spooler**

On a Mac connected to your AppleTalk network, open Chooser and select the
printer driver for the printer type being emulated. For example, if Simple
Spooler is emulating an AppleTalk ImageWriter, then select the "AppleTalk
ImageWriter" icon in Chooser. You should see the spooler appear as a printer
in the list. After selecting it and closing the Chooser window, you should be
able to print to the spooler from any application.


**About the log**

Simple Spooler displays a single window with a log of its activity. This log is
entirely in memory, and does not persist when the application quits. To avoid
running out of memory, the earliest entries are deleted periodically as new
ones are added to the end.

By default, messages are logged when the spooler starts up or stops, when
incoming connections are handled, when spooled jobs are printed, or if an error
occurs. However, more details can be enabled to aid in debugging. There are four
log levels, each printing its own messages as well as those of the levels below
it. Level 0 is the default. At level 1, internal activity and warnings are
logged. At level 2, all protocol messages are displayed, and at the maximum
level 3, additional debug data is logged.

Because changing the log level to 2 or higher will greatly diminish server
performance, and the extra information is intended for development purposes
only, there is no menu item for this hidden feature. Press the command-shift-L
key combination to increase the log level by 1. After reaching 3, the log
level will reset to 0 again. The spooler should normally be run only at the
default log level 0.

Pressing the command-shift-S key combination will output the server's current
status to the log. Alternatively, select Print Status from the Control menu.


**About the print queue**

The first time Simple Spooler is run, it will create a spool folder (named
Simple Spooler) in the Preferences folder within the System Folder, or in the
System Folder itself if prior to System 7.0. Print jobs are saved as temporary
files in the spool folder. Their file names start with a prefix that depends on
the printer type selected: IW for ImageWriter, LQ for ImageWriter LQ, and LW for
LaserWriter. When the spooler is running, it checks periodically for files in
this folder which have the file type 'pjob', whose names start with the current
prefix and a hyphen, and do not end in a .ps extension. For example, a file
named "IW-12345" will be printed, but not "IWEm" or "IW12345" or "IW-12345.ps".

Spool files are processed in the order they were added to the folder. If the
Enabled checkbox was selected and printing is currently enabled, the file is
sent to the selected serial port. Once all bytes in the spool file have been
sent to that port without an error, that job is considered complete and the file
is deleted.


**About LaserWriter spooling**

This application was primarily designed to emulate an ImageWriter printer, but
it can also create a virtual LaserWriter which spools its print jobs to
PostScript files. This feature is somewhat redundant, as you could just select
"print to file" in the LaserWriter print dialog to obtain the same result. An
ImageWriter cannot render PostScript code, but older LaserWriter models with a
serial port connection can theoretically be used to print spooled files; this
has not been tested.

Note: you can use software such as Ghostscript, Adobe Illustrator, or even
Preview.app (on older versions of Mac OS X) to view PostScript files, or convert
them to another format for viewing on a modern computer.


**Generating PostScript output from ImageWriter print jobs**

If you would like to have print jobs for an ImageWriter automatically generate
PostScript output files, simply copy the "IWEm" file from this distribution into
the spool folder. "IWEm" (ImageWriter Emulator) is PostScript code from Apple
that can interpret ImageWriter print sequences. When a print job is received
successfully, and the file "IWEm" is found in the spool folder, a second file
with a .ps extension will also be created and appear in the folder. This .ps
file can be viewed in applications which support PostScript.

Note: IWEm is not compatible with color printing, or with the ImageWriter LQ's
Best and Faster modes. A better option for converting ImageWriter spool files
into a format that can be viewed on a modern computer is the 'imagewriter'
command line tool, available from <https://github.com/greg-kennedy/ImageWriter>.


**Using Simple Spooler in a Mac emulator**

If you don't want to keep a real Mac and ImageWriter turned on for hours, you
can run Simple Spooler in a virtual Mac with emulation software such as QEMU,
Mini vMac, or Snow that supports AppleTalk networking. Be aware that printing to
a serial port where nothing is actually connected sends those bytes to nowhere.
You may want to uncheck the Enabled box for printing to a serial port when
running Simple Spooler in an emulator, and instead copy the spool files over to
your real Mac's spool folder when you are ready to print them.


**Known issues**

Printing to the spooler from the same Mac which is running the spooler does not
work well yet. (There's a bug with self-send mode. Don't try it unless you like
rebooting.)

On System 6, there are some errors being logged with the tickle mechanism which
is part of PAP. This should be fixable and does not seem to affect printing.

There is currently no handshaking with the real printer before attempting to
print, so if no printer is connected to the selected port, data is sent into the
void without any error and the spool file is deleted.

In this release, LaserWriter spooling is only known to work with version 8.3.4
of the LaserWriter 8 driver. This is the version which shipped with system
software 7.5.3. Version 8.6.1 and later send an additional query prior to normal
setup, as does 7.1.1 and likely others. In general, we can't yet handle more
than one query transaction (meaning the driver is asking us to answer its
questions, rather than giving us data) in a given print job. A fix is being
investigated.


**Bug reports, feedback, etc.**

Please let me know about your experience with Simple Spooler, especially if you
run into any problems. This prerelease software is still under development and
not yet considered stable. Bug reports and suggestions for improvement are
always welcome. (When reporting a problem, please mention the system version,
spooler configuration, and what software you are using to print, so I can try
to reproduce it.) Thanks!

<https://mastodon.social/@_the_cloud>
<thecloudexpanse @gmail.com>


**Modification history**

0.1 2026-02-16: first release for testing
0.2 2026-02-23: added ImageWriter 1 compatibility mode
0.3 2026-07-30: split up configuration and startup, so server can auto-run;
                    rewrote filter to run when printing rather than spooling;
                    optionally strip reverse feeds