First post, by keenerb
I've recently been spending more time playing with printing in my vintage environment and have learned a few things that others might find useful, even though I'm still a BIG fan of the retroprinter device from retroprinter.com. I will be honest though, retroprinter's "plug it in and it just works" is way too easy for vintage computing, I need something more complicated to feel like I've accomplished anything.
The first thing to note is that LOT of modern printers and not too terribly out of date printers support PCL natively. This is important because, in my experience, most Deskjet drivers in applications output PCL that is still perfectly usable in these modern printers. Currently I'm printing to a brand new HP Smart Tank 6001 printer directly, using a Deskjet 550c driver in Printmaster Gold for MSDOS and it looks great!
Secondly, most "wifi" printers and a lot of business laser printers (or at least the HP and Brother printers I've been playing with) seem to support raw data input on tcp port 9100, also known as HP's Jetdirect port. For older/vintage printers, jetdirect devices are readily available for a few dollars at flea markets, yard sales, ebay, and facebook marketplace that can route raw printer streams on port 9100 to a standard parallel port printer.
The third thing of interest is that many msdos and windows apps support redirecting printer output to a raw text file. And for those that don't, utilities like prn2file will redirect LPT data to a raw printer data text file.
These three features conveniently grant a really flexible method of getting print output from that old Tandy, IBM-PC, or DOSEMU2/Dosbox install without any need for additional hardware or software, using Netcat.
For a physical machine, you can directly use mbbrutman's mtcp and nc.exe and dump the raw print file from your vintage hardware to the jetdirect interface. You can copy the file from your retro pc to an etherdfs/smb shared folder and netcat or ncat from a windows or linux box. If you have no network access, you can use floppy disks, HXC/Flashfloppy, or however you are accustomed to moving data to get it to a networked machine. The only requirement is that you ultimately end up with the raw printer output file and a machine capable of running netcat. "nc <printer ip> 9100 < rawfile.out" and you should be good to go.
For DOSBOX/DOSEMU2 all of the above still apply, of course, but they can be configured to automatically pass printer data on as an easier option. I personally use Dosemu2 for my non-gaming environments and it has excellent support for redirecting printer output via dosemu.conf:
$_lpt1 = "nc <epson jetdirect ip> 9100"
$_lpt2 = "nc <hp jetdirect ip> 9100"
These options give me an ESC/P2 printer on LPT1 (redirected via a Jetdirect interface to a physical Epson 24 pin printer) and a PCL Deskjet printer on LPT2 (directly to my Smart Tank port 9100 WIFI interface). Printing to either of those lpt ports from DOSEMU2 (with the appropriate driver) queues up the raw print file and dumps it to netcat stdin and prints it out, no problem.
DOSBOX-X I only use for gaming and haven't spent any time testing printing, but theoretically it supports a similar method:
[parallel]
parallel1=file file:output.prn timeout:2000 openwith:"ncat.exe <epson jetdirect ip> 9100"
As a fun side effect, having a vintage dot matrix printer installed on a jetdirect interface also lets you use ESC/P printers with any modern version of windows, thanks to Epson's windows 11 compatible ESCP drivers. You can print out your gmail in glorious nine pin monochrome on sheet fed paper if that floats your boat.