AmendHub

Download

thecloud

/

SimpleSpooler

/

README

 

(View History)

thecloud   Simple Spooler 0.4 release Latest amendment: 9 on 2026-08-07

1 ## Simple Spooler 0.4 ##
2 Copyright (c) 2026, Ken McLeod.
3
4 This application acts as a virtual printer on an AppleTalk network, receiving
5 print jobs using PAP (Printer Access Protocol) and spooling them to files. It
6 can either print immediately or at a later scheduled time, sending the print
7 job to a locally-connected ImageWriter printer which would otherwise not be
8 visible on the network.
9
10 Simple Spooler is freeware. You may use and distribute the software at no
11 charge. See the LICENSE file for conditions on your use of the source code.
12 No AI or LLM was used at any stage of creating this software. There is no
13 substitute for the knowledge that is gained through personal experience.
14
15
16 **System requirements**
17
18 System 6.0 or later (up to Mac OS 9.2.2) is currently required to run Simple
19 Spooler. This software has been tested on System 6.0.5, 7.0.1, and 7.5.3, as
20 well as Mac OS 8.6 and 9.2.2.
21
22 AppleTalk must be set to Active in the Chooser. You should have enough free
23 disk space on your startup disk to accomodate the print jobs you expect to
24 receive. ImageWriter spool files occupy less space than LaserWriter spool
25 files, but all can add up if they are not being processed immediately.
26
27
28 **Starting the spooler**
29
30 After opening the application for the first time, a dialog will present the
31 following options (also available from "Settings..." in the Control menu):
32
33 * Printer name
34 Type a name for the print spooler, which you can think of as a virtual
35 printer. This name will appear on the network and can be selected by other
36 users as an AppleTalk printer in the Chooser.
37
38 * Auto-run at launch
39 Select this checkbox if you want the spooler to run automatically when the
40 application opens, rather than needing to manually click Start. This allows
41 for unattended server operation, e.g. by placing an alias to Simple Spooler
42 in your Startup Items folder on System 7.0 or later.
43
44 * Virtual printer type
45 Select one of the icons representing LaserWriter, ImageWriter LQ, or
46 ImageWriter to create a virtual printer of that type. For an ImageWriter or
47 LQ, you can additionally select whether the printer is seen as having a
48 color ribbon or a sheet feeder. The "IW1 compatibility" checkbox improves
49 compatibility with the original ImageWriter I by removing newer printer
50 control codes that only the ImageWriter II understands. The "Skip Reverse
51 Feeds" checkbox strips control codes that would cause your printer to roll
52 the paper backwards; selecting this can prevent misprints and paper jams.
53
54 * Print to this port
55 Select the icon for the local serial port where your ImageWriter printer
56 is connected. If the Enabled checkbox is selected, spooled print jobs will
57 automatically be printed to this port once they have been received, as long
58 as the current time is within the scheduled printing hours. The default
59 setting is 12 AM - 12 AM (or 0 - 24), an unrestricted span of 24 hours
60 starting at midnight.
61
62 You can restrict printer use by using the up/down arrow control to change the
63 start and end times; for example, you may only want printing to occur during
64 business hours and not at night. If the spooler receives a print job outside
65 the specified hours, it will be printed later once the start hour is reached.
66 Uncheck the Enabled box if you don't have a local printer connected, or if you
67 just want to hold all jobs for printing at a later date.
68
69 Click Start to begin running the spooler. This registers the printer name you
70 provided on the AppleTalk network, listens for incoming print jobs, and
71 prepares to print any previously spooled jobs in its spool folder.
72
73
74 **Stopping the spooler**
75
76 The spooler can be stopped by selecting "Stop Spooler" from the Control menu,
77 or by quitting the application.
78
79
80 **Printing to the spooler**
81
82 On a Mac connected to your AppleTalk network, open Chooser and select the
83 printer driver for the printer type being emulated. For example, if Simple
84 Spooler is emulating an AppleTalk ImageWriter, then select the "AppleTalk
85 ImageWriter" icon in Chooser. You should see the spooler appear as a printer
86 in the list. After selecting it and closing the Chooser window, you should be
87 able to print to the spooler from any application.
88
89
90 **About the log**
91
92 Simple Spooler displays a single window with a log of its activity. This log is
93 entirely in memory, and does not persist when the application quits. To avoid
94 running out of memory, the earliest entries are deleted periodically as new
95 ones are added to the end.
96
97 By default, messages are logged when the spooler starts up or stops, when
98 incoming connections are handled, when spooled jobs are printed, or if an error
99 occurs. However, more details can be enabled to aid in debugging. There are four
100 log levels, each printing its own messages as well as those of the levels below
101 it. Level 0 is the default. At level 1, internal activity and warnings are
102 logged. At level 2, all protocol messages are displayed, and at the maximum
103 level 3, additional debug data is logged.
104
105 Because changing the log level to 2 or higher will greatly diminish server
106 performance, and the extra information is intended for development purposes
107 only, there is no menu item for this hidden feature. Press the command-shift-L
108 key combination to increase the log level by 1. After reaching 3, the log
109 level will reset to 0 again. The spooler should normally be run only at the
110 default log level 0.
111
112 Pressing the command-shift-S key combination will output the server's current
113 status to the log. Alternatively, select Print Status from the Control menu.
114
115
116 **About the print queue**
117
118 The first time Simple Spooler is run, it will create a spool folder (named
119 Simple Spooler) in the Preferences folder within the System Folder, or in the
120 System Folder itself if prior to System 7.0. Print jobs are saved as temporary
121 files in the spool folder. Their file names start with a prefix that depends on
122 the printer type selected: IW for ImageWriter, LQ for ImageWriter LQ, and LW for
123 LaserWriter. When the spooler is running, it checks periodically for files in
124 this folder which have the file type 'pjob', whose names start with the current
125 prefix and a hyphen, and do not end in a .ps extension. For example, a file
126 named "IW-12345" will be printed, but not "IWEm" or "IW12345" or "IW-12345.ps".
127
128 Spool files are processed in the order they were added to the folder. If the
129 Enabled checkbox was selected and printing is currently enabled, the file is
130 sent to the selected serial port. Once all bytes in the spool file have been
131 sent to that port without an error, that job is considered complete and the file
132 is deleted.
133
134
135 **About LaserWriter spooling**
136
137 This application was primarily designed to emulate an ImageWriter printer, but
138 it can also create a virtual LaserWriter which spools its print jobs to
139 PostScript files. This feature is somewhat redundant, as you could just select
140 "print to file" in the LaserWriter print dialog to obtain the same result. An
141 ImageWriter cannot render PostScript code, but older LaserWriter models with a
142 serial port connection can theoretically be used to print spooled files; this
143 has not been tested.
144
145 Note: you can use software such as Ghostscript, Adobe Illustrator, or even
146 Preview.app (on older versions of Mac OS X) to view PostScript files, or convert
147 them to another format for viewing on a modern computer.
148
149
150 **Generating PostScript output from ImageWriter print jobs**
151
152 If you would like to have print jobs for an ImageWriter automatically generate
153 PostScript output files, simply copy the "IWEm" file from this distribution into
154 the spool folder. "IWEm" (ImageWriter Emulator) is PostScript code from Apple
155 that can interpret ImageWriter print sequences. When a print job is received
156 successfully, and the file "IWEm" is found in the spool folder, a second file
157 with a .ps extension will also be created and appear in the folder. This .ps
158 file can be viewed in applications which support PostScript.
159
160 Note: IWEm is not compatible with color printing, or with the ImageWriter LQ's
161 Best and Faster modes. A better option for converting ImageWriter spool files
162 into a format that can be viewed on a modern computer is the 'imagewriter'
163 command line tool, available from <https://github.com/greg-kennedy/ImageWriter>.
164
165
166 **Using Simple Spooler in a Mac emulator**
167
168 If you don't want to keep a real Mac and ImageWriter turned on for hours, you
169 can run Simple Spooler in a virtual Mac with emulation software such as QEMU,
170 Mini vMac, or Snow that supports AppleTalk networking. Be aware that printing to
171 a serial port where nothing is actually connected sends those bytes to nowhere.
172 You may want to uncheck the Enabled box for printing to a serial port when
173 running Simple Spooler in an emulator, and instead copy the spool files over to
174 your real Mac's spool folder when you are ready to print them.
175
176
177 **Known issues**
178
179 Printing to the spooler from the same Mac which is running the spooler does not
180 work well yet. (There's a bug with self-send mode. Don't try it unless you like
181 rebooting.)
182
183 On System 6, there are some errors being logged with the tickle mechanism which
184 is part of PAP. This should be fixable and does not seem to affect printing.
185
186 There is currently no handshaking with the real printer before attempting to
187 print, so if no printer is connected to the selected port, data is sent into the
188 void without any error and the spool file is deleted.
189
190 In this release, LaserWriter spooling is only known to work with version 8.3.4
191 of the LaserWriter 8 driver. This is the version which shipped with system
192 software 7.5.3. Version 8.6.1 and later send an additional query prior to normal
193 setup, as does 7.1.1 and likely others. In general, we can't yet handle more
194 than one query transaction (meaning the driver is asking us to answer its
195 questions, rather than giving us data) in a given print job. A fix is being
196 investigated.
197
198
199 **Bug reports, feedback, etc.**
200
201 Please let me know about your experience with Simple Spooler, especially if you
202 run into any problems. This prerelease software is still under development and
203 not yet considered stable. Bug reports and suggestions for improvement are
204 always welcome. (When reporting a problem, please mention the system version,
205 spooler configuration, and what software you are using to print, so I can try
206 to reproduce it.) Thanks!
207
208 <https://mastodon.social/@_the_cloud>
209 <thecloudexpanse @gmail.com>
210
211
212 **Modification history**
213
214 0.1 2026-02-16: first release for testing
215 0.2 2026-02-23: added ImageWriter 1 compatibility mode
216 0.3 2026-07-30: split up configuration and startup, so server can auto-run;
217 rewrote filter to run when printing rather than spooling;
218 optionally strip reverse feeds so paper never rolls back
219 0.4 2026-08-06: fix bug that failed to remove a filtered byte if it was the
220 last byte in the buffer being processed;
221 strip extra linefeeds generated by a reverse feed;
222 reset printer to defaults before starting each print job