Show HN: Printercow – Turn any thermal printer into an API endpoint
110 comments
·January 21, 2025black_puppydog
I can see the value in this, but I don't get why it needs to be a SaaS. Don't get me wrong; a revenue stream for something this obviously useful is great! But why not just make it dual licensing; non-commercial projects get it under AGPL or some custom license that prevents them from using it commercially. Everyone else gets a bog-standard yearly license or such... Why not?
jmann99999
I completely agree with this.
It would be nice to try it with SAAS and then buy a local license.
It is similar to the Tydbit device [0] where you can program the device but it runs on their cloud. That is fine unless Tydbit goes out of business. That fear of loss stopped me from doing too much programming with it.
I think the same may be true here.
lionpixel
I like this! Thanks for the feedback!
TheNewsIsHere
I have a home project that is actually a great fit for this, but a SaaS service would be a hard stop. Self-hosted or bust for my use case.
I mean, it would be a waste of _your_ resources to host it for my use case too!
downrightmike
We're long past the point where most people have a computer in their pocket and not one on their desk
mrtksn
Okay, the question is: Can it print with a Cat Printer?
You know, the cheap toy-like printers? Like this: https://www.amazon.co.uk/Portable-Instant-Bluetooth-Wireless...
I was trying to hack mine to use it with an app I want to create for personal use. Currently only prints using the official Fun Print app over a bluetooth connection.
There are projects[0]that are supposed to work with a cat printer but mine specifically isn’t. It identifies itself as “MXW01” , which is different that the printers tested.
[0] https://github.com/NaitLee/Cat-Printer https://github.com/bitbank2/Print2BLE
KomoD
As far as I understand it:
If it supports ESC/POS commands then yes, otherwise no.
namero999
Funny, just today I finished reversing a similar toy printer, the "bear" printer, not the "cat" one, and writing a driver/library for it in Rust just for the sake of finally learning a bit of it.
Looking at the code you shared, it seems like the cat has quite a different protocol than the bear. The opcodes seem different, and there seems to be some sort of crc happening that is completely absent in the bear. So I doubt my code will work without major adjustments.
In case you missed it, the first link you shared also has a "test unknown printer", so maybe yours is just a minor hardware iteration but might work nonetheless!
mrtksn
I managed to get it going through inspecting the bluetooth packages, now building my app for it. Couldn't get the correct image output yet but it appears to be simple, just have to send the image line by line
namero999
Most likely the logic is at least similar. Yes, line by line, each line is encoded in bytes where each bit is a pixel. I had to "invert" the image as the printer will print the "white" pixels (those with a value >0).
The printer has an internal buffer so you can send multiple lines at the same time, but on the bear this starts to break down after 200 lines or so (consider that the bear has a higher 300 dpi resolution, so 576 pixel per line). Also pay attention to overheating, I put 1 or 2 seconds of pause every 400 lines just in case.
freedomben
This is a great idea, and it looks like you've done a great job! I share your enthusiasm for these printers. I have a Rongta receipt printer sitting on my desk that I like to play with :-)
I have a business usecase for something like this (now that Chrome doesn't allow printing to ESC/POS), and exposing the printer interface as an HTTP API is a clever and great solution! But, sending the data through a third party is a complete no-go for us for reasons of compliance. For this architecture to work for us we would have to host it on our VPN and serve it from our own domain as our customers have a strict whitelist.
As cool an idea as this is, honestly though I don't think this should be a SaaS. Certainly it doesn't fit the typical mold of SaaS where there's nothing to install because it's all delivered through the web. Given you have to install a local Pi or other, you lose all the benefits of SaaS and also incur all the downsides of SaaS. It feels like it was shoehorned into a SaaS because otherwise it would be very hard to monetize. I don't blame you for that because it is indeed a hard problem to figure out how to get paid (in fact I've abandoned good ideas prevously because it was either SaaSify something that shouldn't be a SaaS or else face huge obstacles getting paid), but I wanted to share my thoughts honestly.
lionpixel
Thank you for the detailed feedback! I really appreciate you sharing your perspective, especially about the compliance requirements. You're right, and you're not alone - many others in the thread have expressed similar concerns about the SaaS approach. After taking some time to reflect, I've decided to pivot towards a dual-track solution:
1. A free, self-hostable version for businesses with compliance requirements or those who prefer to maintain their own infrastructure 2. A cloud version for users who want a managed solution
I'll be working on both versions over the next few weeks. :)
freedomben
That's great news! Seriously, kudos to you for taking such feedback so constructively. I do really think this could be a great path for you. Particularly once the core product is giong, you could look into add SSO, RBAC, and other enterprise-y management features and have a legit open product that makes money selling managed/hosted services to corps. This is niche enough yet common enough that I could see it being very attractive to people building higher level products!
Let me know if I can be of help. I've got quite a bit of devops/infra experience especially containers and kubernetes, as well as mostly backend dev (though enough frontend to be considered "full stack" by many, but IMHO I'm not great at frontend). Very happy to help consult!
mike_d
Since this is basically just a thin wrapper around node-thermal-printer, how much of your SaaS revenue is going back to the author of that project?
RadiozRadioz
Interestingly I made this same exact thing a few years ago for a company I worked at.
Raspberry pi connects to the printer, pi runs a daemon, Daemon connects to a central server and downloads stuff to print, server runs an API with a friendly endpoint.
Difference with mine is that I used CUPS on the pi and generated PDFs for it. I supplied a custom PPD to make the printouts extra crisp, but other than that the OS handled it for me. What I wrote was little more than a PDF generator and a basic spooler.
I can attest that this method is very reliable, if you're looking for confirmation that this architecture can be used in production.
I do question whether it's worth paying for this as a SaaS though. Speaking as someone who has built this, I'd probably build it again and it doesn't take long to get "good enough". The bulk of my time was spent on improving the printout quality from the built-in driver. Which was fun but unnecessary.
smokeydoe
This is really cool. I used to enjoy toying with thermal printers until I found out the paper is coated with a very fine dust of BPA. Still they sell thermal printer cameras on Amazon marketed for children
madphilosopher
Look for kitchen printers. They're dot-matrix / ink ribbon receipt printers for use in restaurant kitchens, where the plate warmers and other sources of heat will turn thermal paper completely black. So, instead, they use rolls of ordinary bond paper.
The fact that they make a loud noise every time an order comes through is useful for a restaurant kitchen, too.
The Epson TM-U220 is one model to consider.
lionpixel
Indeed. But there are some good BPA-free alternatives on the market
echoangle
Is there any way to verify that without getting a Lab to do an analysis? I'm not sure if I can trust stuff labelled BPA-Free from Amazon for example.
kube-system
Even if they are, that doesn't mean they're safer
https://www.epa.gov/sciencematters/are-bpa-substitutes-any-s...
heeton
Buy from a reputable seller for anything important, instead of amazon.
Or, there are apparently at-home testing chemicals that look simple to use. I haven't done it myself though.
xp84
Yeah I would assume that given how easy it is to start a new Amazon seller account and how impossible it is for some random seller in China to face legal repercussions from the US, the likelihood of finding an “_____-free” item to actually be made of whatever the cheapest and most readily available formulation is. (Including the _____), is pretty high.
detritus
Yeah, I've had a couple of odd looks from other people in the supermarket when my daughter's piped up about not being allowed to touch the shopping receipts, haha.
I do get the impression companies are beginning to move back to traditional printed receipts, at least a bit, here in the UK.
codazoda
Inspired by other receipt printer projects on HN, I just purchased a MUNBYN P075 printer last week. I thought it was going to be a lot more complex than it was. I thought I'd have to write ESC/POS codes manually to generate images, for example. But, it's actually quite simple, since there is a printer driver.
I also decided to make a text file for my daily progress report and shoot that over to the printer with `nc`. The only ESC/POS code I'm using is to send the cut command.
I'm also surprised how FAST these printers are now.
Everyone I told I was buying a thermal receipt printer gives me an inquisitive look. I expected that from a lot of people but I was surprised to get the same response from the tech people I work with.
Anyway, they are lovely little devices.
lionpixel
Great choice MUNBYN printers are awesome! Recently I found that NETUM thermal printers are even cheaper for comparable performance. :)
jauntywundrkind
Reminds me of BERG's Little Printer (2012). Someone updated the software stack for em! Nice app, great system, lots of sweet social features & good tools.
Alas it seems built around a specific thermal printer, isn't generic.
https://nordprojects.co/projects/littleprinters https://github.com/nordprojects/sirius?tab=readme-ov-file https://github.com/nordprojects/littleprinters-ios-app
sleepybrett
berg didn't charge for use, just for the printer.. of course they also didn't last long.
sometinsome
Nice! you've built a whole product around and the Twitch demo is great.
In case you need a very basic version of this, I've created a project some time ago, where you can print text over a template, also trough an API and using ESC/POS compatible printers:
lionpixel
In case you don't want to create an account, you can just comment with your prompts and I will enter them myself. You can watch let it print on https://twitch.tv/printercow then. :)
avgDev
Interesting project. I am assuming this is not geared towards business clients who print thousands of labels a day, but more of a fun things to print to thermal printers for individuals? Correct me if I am wrong.
I like the twitch stream, fun approach.
I've wrote quite a few labels in ZPL, which is used for Zebra printers. The reason I've used ZPL code is that serialization happens on the printer itself. Therefore, it is an easy fire and forget.
Can this integrate with a zebra printer? Can this handle large number of prints? Serialization?
lionpixel
I am using Printercow for another project of mine where I developed a POS-system where many thousands receipts need to be printed. This was one of the motivations. AI was kind of a afterthought. :P
voidUpdate
Aww, I was hoping you'd done something fun with the actual firmware of the printer to turn it into something that can receive requests, but its just printing from a pi
irs
This is nice! Was looking for exactly a similar feature in a previous HN discussion [0]. Want something that I can integrate with IFTTT/Zapier.
I was looking to buy one of ESC/POS compatible printer but none of the official sites seem to sell directly on the site and have to contact their sales to get a quote. I see a few on ebay and from third party sellers in Amazon.
Does anyone have a recommendation on where to buy an official / new one without going through the sales call hassle? Or buying from 3rd parties is the only option?
fmajid
I found this one at B&H:
https://www.bhphotovideo.com/c/product/1789487-REG/epson_c31...
irs
Thanks for checking on this. Will look into this model.
gibs0ns
I've used Rongta thermal printers a fair bit, I've found them to be cost effective and easy to use. I mostly use them via WebUSB and some random JS ESC/POS lib. Though I have never bought directly from Rongta.
irs
Yeah Rongta brands are the ones that come up frequently when I search on Amazon. Will check them out. Thanks.
I've always been fascinated by thermal printers – there's something magical about seeing text and images materialize on paper in seconds. But I found that working with them programmatically was always a pain. You either had to deal with ancient printer protocols or use clunky vendor-specific SDKs. So I built Printercow (https://printercow.com) – it turns any thermal printer into an HTTP endpoint with just one command.
Technical details: - Supports any ESC/POS compatible printer (Epson, Star Micronics, etc.) - Handles paper widths from 58mm to 120mm - Automatic image dithering and scaling - Built-in failover protection for high-volume scenarios
Don't have a printer yet but want to try it out? I've got you covered! When you sign-up you get 300 free prints and you can watch your creations come to life on my printer via Twitch live stream (https://twitch.tv/printercow). Perfect for testing your integration before committing to hardware.
I'm particularly excited about the AI integration possibilities. Instead of yet another chat interface, you can have AI generate content that exists in the physical world – artwork, poems, todo lists, custom receipts, etc.
Would love to hear your thoughts, feature requests, or creative use cases you can think of! Also happy to answer any technical questions about the implementation.