I built a dot matrix printer on the web that prints from Windows 3.11
๐จ๏ธ It took over a year and lots of help from Claude Code but I have now been able to create a real dot matrix printer on the web that prints from Windows 3.11 in your browser:
Here's the test page: https://pieter.com/assets/dosbox/serial-test/
I couldn't get the LPT1 port to work but COM2 did work (the dial up model already uses COM1), the JS receives the COM2 serial data (just raw print data) and then prints it
Next is to make the dot matrix printer better looking (kinda 3d like on pieter dot com) and have the paper also flowing in 3d out of the printer and integrate it on the http://pieter.com page
My idea was that it might work because we also capture the COM1 data (from the dial up modem) and send it to a Websocket as a dial up connection, so we should be able to capture the COM2 traffic too but I didn't know how, but now I do
IT WORKS!! ๐
Oh to use it, one thing, you have to go to control panel, printers, set as default printer, and close! Then go to Notepad and you can print
Rough draft but the print will come from this printer here or well that's the goal
Why??? I don't know I just have to make it
๐จ๏ธ Little progress: I generated a dot matrix printer with GPT Image 2 and then some Photopea'ing to make the paper go through
And I got COM1 to work for dial up internet to http://pieter.net (my ISP) while COM2 still works for the printer (that was a challenge)
Which means I can now print anything from the internet, like Hacker News!
Some todo fixes:
- page should scroll out not already be there
- we need some perspective so the paper slowly goes into distance
- integrate it into pieter .com page fully
- add a local print command so you can actually IRL print your printed dot matrix print
You can try it the current WIP here: https://pieter.com/assets/dosbox/serial-test/
๐จ๏ธ๐ผ๏ธ Big progress: it can now print images too
I had to install a different printer driver, Claude Code recommended Epson FX-86e which supported images
Then I printed an image, it helped me dump a .bin from the printer raw data output, then it decoded the .bin and figured out how to draw images on a canvas (in the printer) from that data
So crazy I'd have no clue how to do this without AI ever!
Here's the WIP https://pieter.com/assets/dosbox/serial-test/
Next is integrating it to the frontpage
P.S. I'm on 𝕏 too if you'd like to follow more of my stories. And I wrote a book called MAKE about building startups without funding. See a list of my stories or contact me. To get an alert when I write a new blog post, you can join 13,148 subscribers below:












































































































































































































































































































































































































































































































































































































































