ImageWriter II driverless printing for Windows 11
A small Windows service that turns an Apple ImageWriter II on a serial port into an
IPP Everywhere / AirPrint printer. Windows 11 talks to it with the built-in
Microsoft IPP Class Driver, so there is no vendor driver, no INF and nothing to sign.
macOS, iOS, Linux (CUPS) and Android see it as a Bonjour printer too.
The service rasterises the pages it receives (PWG raster from Windows, Apple raster from macOS/iOS)
into the printer's native bit-image commands and uses every graphics capability the ImageWriter II has:
| Capability |
How it is used |
| All eight horizontal densities: 72, 80, 96, 107, 120, 136, 144, 160 dpi |
pitch commands ESC n / N / E / e / q / Q / p / P; any of them can be offered to clients (Resolutions) |
| 144 dpi vertical |
two interleaved passes 1/144" apart (ESC T 01), 16-row bands |
| 160 x 144 dpi (the Mac "Best" quality) |
offered as a resolution, exact non-square rendering by the client |
| Dot-column repeat (ESC V) and head positioning (ESC F) |
run-length compression and blank skipping: a text page is ~50 KB instead of 230 KB |
| Grouped graphics (ESC g) |
faster printer parsing when literal runs are multiples of eight |
| Four-colour ribbon (ESC K) |
Y, M, C, K separation with grey-component replacement, yellow first as the manual says; colour is the default (Ribbon) |
| Uni/bidirectional head motion (ESC > / <) |
unidirectional by default for perfect interleave registration; draft quality switches to bidirectional |
| Page length (ESC H), top of form (ESC v), reverse feed (ESC r) |
any media from 2x2" to 8.5x17"; reverse feed drives the per-page colour strategy and the automatic tear-off positioning for tractor paper |
| Software switches (ESC Z / ESC D) |
forces no auto-LF, no perforation skip, 8-bit data regardless of the DIP switches |
| Built-in fonts (ESC a, pitches, 6/8 lpi) |
plain-text jobs print with the printer's own Draft / Correspondence / NLQ fonts |
Everything is derived from the Apple ImageWriter II Technical Reference Manual (see
docs/printer-protocol.md), and every escape stream the encoder produces is checked dot-for-dot
by a built-in printer simulator in the unit tests.
All of which was put to immediate and decisive use:
That is the last row of the table. Only the last row.
The service's own status page, which is also what printer-more-info and the Bonjour adminurl point at:
Requires the .NET 10 SDK to build (dotnet build ImageWriterII.slnx) and the .NET 10 runtime to run.
Hardware: connecting the printer to the PC
The ImageWriter II has a Mini-DIN-8 serial port, so it needs a cable and a USB serial adapter to reach a
modern PC. Any chain works as long as it satisfies the two electrical requirements below — the specific parts
here are simply the combination this project was developed and verified against.
The chain
Apple ImageWriter II
│ Mini-DIN-8 (the printer's serial port)
▼
KENTEK Mini-DIN-8 → DB-25 cable 6 ft, male–male, 28 AWG
│ DB-25
▼
CableWholesale DB-25 → DB-9 adapter female–female
│ DB-9
▼
DTECH USB → RS-232 adapter FTDI FT232RL chipset
│ USB
▼
Windows 11 PC appears as COM1
| Part |
Description |
Link |
| KENTEK Mini-DIN-8 to DB25 printer cable, 6 ft |
Male to male, 28 AWG. Sold for ImageWriter I / RS-232. |
Amazon |
| CableWholesale DB9 female to DB25 female adapter |
Joins the printer cable to the USB serial adapter. |
Amazon |
| DTECH USB to serial adapter, 6 ft |
USB to DB-9 RS-232 male, FTDI FT232RL. |
Amazon |
On this chain the printer's ready/busy signal arrives on DSR, so Handshake: Auto selects DSR hardware
handshake — iwprint status reports exactly that. An FTDI chipset is worth insisting on: it honours the
control line in hardware, within the printer's 27-character grace period, so a full page never overruns
the printer's 2 KB buffer.
What actually matters
Two things, whatever parts you use:
- The printer's DTR (Mini-DIN-8 pin 2) must reach the PC on CTS, DSR or DCD. That is the ready/busy line;
without it the PC cannot tell when to stop sending and pages come out garbled.
Handshake: Auto detects
which of the three it landed on.
- DIP switches at their factory settings: 9600 baud (SW2-1 and SW2-2 closed) and hardware handshake
(SW2-3 open). The service overrides every SW1 function in software, so those do not matter.
Cables of this shape are usually listed for the ImageWriter I — the one in the table above is, and it
works fine here. But the name covers two different wirings: some are straight through (what you want) and
some are wired as null-modems, because the ImageWriter I was a DTE. A crossed one leaves the ready line
looking perfectly healthy and still prints nothing, and the fix is a DB-25 null-modem adapter in the chain.
docs/hardware-setup.md has the full pinout, the baud-rate switch table, and how to tell the two apart.
Only the self-identification query (iwprint identify, and Ribbon: Auto) needs the printer-to-PC data
line, Mini-DIN-8 pin 5. Most cables of this kind omit it, which is why the service
defaults to a colour ribbon rather than trying to detect one.
Quick start
Check the link. Wire it up as described under Hardware,
switch the printer on and make sure the Select light is lit, then:
iwprint status --port COM1 # shows CTS/DSR/DCD; one must be high when the printer is on and selected
iwprint identify --port COM1 # "IW10C: ImageWriter, 10-inch carriage, colour ribbon" (needs the printer->PC data line)
If no line is high, the printer is off or deselected, or the cable does not carry DTR. identify
answering "no answer" is normal and harmless — most cables omit the return line.
Step 2 puts iwprint.exe in .\publish and in the install directory. Before the first install, run it
from the source tree instead: dotnet run --project src\iwprint -- status --port COM1.
Install the service (elevated PowerShell, from the repository root):
.\scripts\install-service.ps1 -Port COM1 # add -Handshake DataSetReady etc. to override auto-detection
.\scripts\install-service.ps1 -Port COM1 -Ribbon Black # if a black ribbon is fitted
This publishes to C:\Program Files\ImageWriterII, registers the ImageWriterII service
(automatic start, restart on failure), opens the firewall for TCP 631 / UDP 5353 / TCP 9100 and starts it.
The status page is at http://localhost:631/.
The install defaults to the four-colour ribbon (-Ribbon Color), so colour printing works out of the
box. See Colour printing for why that is not auto-detected.
Add the printer to Windows (elevated PowerShell):
.\scripts\add-printer.ps1
which runs Add-Printer -Name "ImageWriter II" -IppURL http://localhost:631/ipp/print and then pins the
queue's default colour mode to whatever the service reports (Set-PrintConfiguration -Color).
Or use Settings > Bluetooth & devices > Printers & scanners > Add device: the printer is announced
with DNS-SD, so it should be listed by name; if not, Add manually > Select a shared printer by name
http://localhost:631/ipp/print. Windows installs it with the Microsoft IPP Class Driver.
Windows caches the printer's capabilities when the queue is created. After changing Ribbon,
Resolutions or MediaSupported, restart the service and re-run add-printer.ps1, or Windows keeps
offering the old capabilities.
Print. Print quality in the Windows dialog maps to the resolutions the service offers
(72x72 draft, 144x144 default, 160x144 best). Paper sizes come from MediaSupported.
With a black ribbon, also see Mono or Grayscale, which is the setting that
decides how dark your pages come out. iPhone, iPad and Mac need no setup at all — see
AirPrint.
Console mode and testing without paper
Run ImageWriterII.Service.exe from a prompt to see the log live. Any setting can be overridden on the
command line, and a file can stand in for the printer:
ImageWriterII.Service.exe --ImageWriter:HttpPort=8631 "--ImageWriter:Serial:PortName=file:D:\out.iw"
iwprint ipp attrs http://localhost:8631/ipp/print
iwprint make-pwg photo.jpg photo.pwg --dpi 144x144 && iwprint ipp print http://localhost:8631/ipp/print photo.pwg
iwprint render D:\out.iw out.png # what the printer would have printed
iwprint testpage --out page.iw --png page.png followed by iwprint render page.iw page-render.png
shows the alignment test page exactly as the printer will produce it.
AirPrint from iPhone, iPad and Mac
There is nothing to install on the Apple device. The service is the AirPrint printer: it answers
Bonjour queries itself and speaks the IPP that iOS and macOS expect, so an ImageWriter II from 1985
shows up in the iOS share sheet next to any modern printer.
Print
- Put the iPhone, iPad or Mac on the same network segment as the Windows PC — the same Wi-Fi SSID or
the same wired LAN behind one router. Bonjour is link-local multicast; it does not cross subnets, VLANs,
guest-network isolation, or most VPNs.
- Make sure the ImageWriter II is switched on, has paper and the Select light is on. A deselected
printer holds the serial line busy and the job just sits in the queue.
- iOS / iPadOS: open anything printable, tap the share button, tap Print, tap Printer and pick
ImageWriter II. Set copies and paper size, then Print.
macOS: File > Print. The printer appears under Nearby Printers; the first print sets it up
automatically with AirPrint (no driver, no PPD).
- Watch the job at http://localhost:631/ on the PC — it shows the live band-by-band progress and lets you
cancel. The printer is slow: 9600 baud is about 960 bytes/s, so a full-coverage 144 dpi letter page takes
roughly four minutes, which is also about as fast as the mechanism goes.
Colour, paper size, and the draft/normal/best quality setting all come through from the Apple print dialog.
Apple devices send Apple Raster (image/urf), which the service decodes natively — the same code path as
the PWG raster Windows sends.
What the service advertises
Confirmed on the wire with iwprint mdns and a raw DNS-SD query:
|
|
| Service types |
_ipp._tcp on TCP 631, with the _universal subtype AirPrint looks for and a _print subtype; plus _pdl-datastream._tcp (TCP 9100) and _http._tcp for the status page |
| Host record |
<HostName>.local (default imagewriter-ii.local), answered per interface with the address of the interface the query arrived on, so a multi-homed PC hands each network the address that works on it |
| Key TXT records |
rp=ipp/print, ty=Apple ImageWriter II, adminurl, pdl=image/pwg-raster,image/urf,application/octet-stream,text/plain, URF=V1.4,W8,SRGB24,CP1,IS1,MT1-2,OB9,PQ3-4-5,RS72-144, Color=T (with a colour ribbon), Duplex=F, UUID, PaperMax=legal-A4 |
| TTLs |
4500 s for PTR, 120 s for SRV/TXT/A with the cache-flush bit, and the 10 s / no-cache-flush form RFC 6762 requires for legacy unicast queries |
SRGB24 only appears in URF — and Color=T only becomes T — when the service believes a colour ribbon
is fitted. That is what tells iOS to send colour, so a black-ribbon configuration makes Apple devices send
grayscale, which is what you want.
Firewall
The Apple device connects from the LAN, so Windows Firewall has to allow the traffic on the profile your
network is classified as. Home Ethernet and Wi-Fi are very often Public on Windows, not Private.
install-service.ps1 therefore creates its rules for every profile by default, still scoped to this one
program and to these ports:
| Port |
Protocol |
Why |
| 5353 |
UDP |
Bonjour / mDNS discovery. Without it the printer never appears in the iOS printer list. |
| 631 |
TCP |
IPP: the actual print traffic. |
| 9100 |
TCP |
Raw "JetDirect" socket, only needed by old software. Drop the rule if you do not use it. |
Narrow it with .\scripts\install-service.ps1 -FirewallProfile Private,Domain if your LAN is classified
Private and you would rather it stayed that way.
Troubleshooting AirPrint
- The printer never appears in the iOS printer list. Almost always mDNS not reaching the phone.
Check in order: UDP 5353 allowed on the current