Show HN: Printercow – Turn any thermal printer into an API endpoint

printercow.com

116 points by lionpixel 16 hours ago

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.

black_puppydog 12 hours ago

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 8 hours ago

    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.

    [0] https://tidbyt.com

  • lionpixel 12 hours ago

    I like this! Thanks for the feedback!

    • TheNewsIsHere 8 hours ago

      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!

freedomben 2 hours ago

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.

RadiozRadioz 4 hours ago

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.

mrtksn 9 hours ago

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 7 hours ago

    As far as I understand it:

    If it supports ESC/POS commands then yes, otherwise no.

  • namero999 6 hours ago

    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!

irs 2 hours ago

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?

[0] https://news.ycombinator.com/item?id=42599784

codazoda 12 hours ago

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 9 hours ago

    Great choice MUNBYN printers are awesome! Recently I found that NETUM thermal printers are even cheaper for comparable performance. :)

JJOmeo 2 hours ago

This could be plain software on any computer with network and a serial port. Not sure if the product is tied to RP hardware but it certainly wouldn't have to be. I work with thermal printers controlled by significantly less powerful hardware still running Linux, and still easily hit physical speed limits. I'd rather see this as a pure software daemon that can run anywhere.

dougi3 an hour ago

I do not have a Raspberry Pi laying around, but I do have an Ubuntu computer. Can the Printercow code be executed on my Ubuntu computer?

sometinsome 13 hours ago

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:

https://github.com/emi420/esc-pos-server-print

avgDev 8 hours ago

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 13 hours ago

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. :)

  • nolroz 13 hours ago

    Ok how about a D&D style character sheet for a Lvl 2. Aarakocra barbarian. Lets make it brief and fun with emojis and include prompts for basic rolls and a way to keep track of health points by filling in bubbles or boxes.

Toxygene 7 hours ago

Very cool. I created a thermal printer project a few years back that prints (low quality) proxies of Magic: the Gathering cards based on the rules for "Momir Basic". It was a fun project, though formatting images to work with the various ESC/POS image formats was quite a challenge.

https://magic.wizards.com/en/formats/momir-basic https://imgur.com/gallery/momir-basic-irl-g2S3hJT

  • PokeyCat 4 hours ago

    Very cool! I did a similar project with an accompanying app that connected to one of these inexpensive printers over Bluetooth in order to play a Discord, Lord of Disharmony commander deck in person.

    The portability of the whole setup makes it easy to bring to an LGS, it's always a treat to see people's reactions when I pull out the printer and they see how the deck works!

voidUpdate 12 hours ago

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

e28eta 3 hours ago

long shot: I’ve got a USB-based ESC/POS printer, but couldn’t get my mac nor RPI to recognize it as a printer through CUPS.

The printer shows up in the USB tree, but (maybe?) needs a driver to be recognized as a “printer”? I was trying to follow tutorials that treated it as a line printer, but unsuccessfully.

Any idea how much luck I will have if I try this out? Does this project rely on working drivers? Or does it handle the raw USB communication?

It’s an IBM-branded Type 4610 Model TF6.

  • JJOmeo 2 hours ago

    Some of these show up as USB to serial converters and while you do need appropriate kernel drivers for that, they'll never be recognized as a "printer". Still usable though.

rounce 12 hours ago

What's the story if you want to self-host?

  • lionpixel 12 hours ago

    Speaks nothing against this - though give it some time to leave the alpha phase. Hosting is super easy using Docker and e.g. Coolify as PaaS right now.

    • rounce 8 hours ago

      Is there a public repo?

heeton 13 hours ago

This is awesome! I have a very hacky prototype doing something similar, you've put way more effort into PrinterCow and it looks great.

What's the tech? (I'm crossing my fingers for Elixir/Nerves but I suspect that's still a bit niche)

Edit, I'm now signed up - though I'm struggling to find the install instructions for the RPi.

  • lionpixel 12 hours ago

    Thanks so much! Elixir was on my list but decided for Fastify (Node v22), Postgres and Vue3 in the end as these are the things I am more familiar with. :) The command is on the Printercow homepage - though proper docs are coming by end of the week.

    • heeton 12 hours ago

      (I meant for the Pi software)

      Edit: had a look at the firmware and it's not Nerves - but that's fine! I was just curious :)

      • lionpixel 12 hours ago

        Raspberry Pi Installation: - Open Raspberry Pi Imager - Select Raspberry Pi OS Lite (32bit) --> Lite is without desktop environment and saves some Memory on the PI :) - Start the Pi and enter: curl -fsSL https://printercow.com/pi/install.sh -o install.sh \ && chmod +x install.sh \ && sudo ./install.sh

nexus_six 10 hours ago

I'm not sure what the point of this really is. Many of those printers and POS systems have OpenCUPS support already, which is more or less "one command". If it requires a Raspberry Pi I have no idea what you are selling. Can you please elaborate on this?

  • JJOmeo 2 hours ago

    I've got a bunch of thermal printers in my work lab that definitely don't have this but they all support ESC/POS. They're all currently produced kiosk style printers.

  • lionpixel 9 hours ago

    Valid question. Printercow is aiming for a plug-and-play scenario where you can use whatever thermal printer you want with an extensive html-like template engine.

smokeydoe 13 hours ago

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 10 hours ago

    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 13 hours ago

    Indeed. But there are some good BPA-free alternatives on the market

    • echoangle 13 hours ago

      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 13 hours ago

        Even if they are, that doesn't mean they're safer

        https://www.epa.gov/sciencematters/are-bpa-substitutes-any-s...

        • heeton 12 hours ago

          That study looked at 6 similar plasticizers.

          The alternative chemicals for thermal paper are totally different. That's not to say that they are guaranteed safe, but that study is inapplicable.

          E.g. one type of paper claims to use Ascorbic Acid (vitamin C). No idea what else is in it of course, but it's not a BGA-analogue plasticizer.

          • kube-system 12 hours ago

            > E.g. one type of paper claims to use Ascorbic Acid (vitamin C). No idea what else is in it of course, but it's not a BGA-analogue plasticizer.

            How would you know it doesn't, if you don't know what's in it?

            Regardless, my point is that many BPA-analogue containing products advertise their BPA-free status.

            • heeton 3 hours ago

              My comment was that BPA is not used in thermal paper as a plasticizer, which that linked study was examining.

              • kube-system 17 minutes ago

                Yes, it's a used as a developer, but as is common in many cases when replacing chemicals with other chemicals -- similar chemicals have similar properties. And in fact, some BPA-free thermal paper use BPS for example.

      • heeton 12 hours ago

        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.

        • echoangle 12 hours ago

          The question is who is reputable. Even when buying from a well known store, I don’t know how they audit their suppliers, because the paper is bound to be made by some company I’ve never heard of.

      • xp84 6 hours ago

        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 11 hours ago

    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.

maalber 12 hours ago

Love the idea about a demo on twitch. Simple yet effective! Next up, develop a twitch bot interface so you can handle everything directly there

  • lionpixel 12 hours ago

    Thanks for the feedback! Thought about this as well! If enough people are interested I'll integrate a one-click install option. :)

ksdme9 13 hours ago

The whole twitch demo thing is genius and fun. Do printer companies usually not provide a first party apps or integrations?

  • lionpixel 13 hours ago

    When it comes to regular ink/laser printers: yes. When it comes to thermal printers, you are normally left alone with just the ESC/P protocol, plus most printers handle the commands in a different way. The way I solved this issue is to write an image buffer directly to the printer, circumventing the protocol and always ensuring that prints look the same regardless of the printer.

    • xp84 6 hours ago

      Are prints as clear and as fast printing everything as an image? Or are there some tradeoffs?

ricenb 12 hours ago

The demo is great, would give a try asap.

dmd 13 hours ago

> 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.

Incredible. Instead of just creating online trash that nobody wants to read, it can create physical trash too! For maximum art, it can feed directly into a shredder.

  • lionpixel 12 hours ago

    Totally get the resentment. However, I'm particularly excited about the benefits this could bring, especially for people like my grandma with dementia. She could say, "Print my shopping list," or "Can you write down my son's phone number?" Only thing missing for now is smarter home assistant devices as Alexa is too dumb to handle such requests. :/

    • lnenad 12 hours ago

      It's sad how jaded hn can sometimes be. I love the idea and I think there are so many ways it could be useful.

    • prmoustache 12 hours ago

      The results could be interesting...

      Mom? Are you cooking crystal meth at home, what is all this for? And why did you bought 500 boxes of condoms?

  • heeton 13 hours ago

    Extremely shortsighted take.

    I currently use a local LLM to scan my notes, meeting transcripts, todo list and calendar. I currently have an iPad that displays some items (e.g. if I have important personal tasks to do today that I might have forgotten) and I would love it to be printed out like this.

    Nothing to do with generating novel text, it's just used as a flexible API to my existing text and items.

    • d1sxeyes 12 hours ago

      Is that handwritten notes? What LLM are you using for that and what level of accuracy do you get?

      • heeton 3 hours ago

        No, just computer notes. Currently on llama3.2 text-only 3B, running on an M3 Macbook Pro.

        Accuracy is good for my limited use case (extracting context, giving me links and reminders).

        It's not yet good enough (for me) at summarising larger notesets, it might miss out useful / pertinent things in a way Claude does not.

        I'd also like it to be better at inferring partial context from audio transcriptions. But hey, it's an open source 2GB model running on my laptop, it'll get better.

  • sondr3 12 hours ago

    Which then again could have AI integrations of its own! Imagine the endless possibilities of AI shredding.

    • badgersnake 12 hours ago

      A shredding company that automatically scans and uploads your documents before securely disposing of them. The scanned text is then used to train AI. It’s like the physical equivalent of ignoring robots.txt.

      I’m sure YC will fund it.

  • redleader55 12 hours ago

    We, as a society, are at the point where we can afford to waste resources in this dumb way "for art". I personally find this obscene.

    I wouldn't worry though, I have a feeling this is going away by the end of the decade.

corytheboyd 12 hours ago

Is there something out there like this that is self-hosted? It’s ridiculous that this isn’t, and it’s going to become a pay-per-print model?! I don’t care about the AI nonsense, it’s a printer.

I could see myself using something like this to print recipes. I’d like to avoid getting my fancy cook book dirty, but have still have recipe in the kitchen to reference. Phone works okay until you have to scroll with dirty/wet hands.

  • codazoda 11 hours ago

    I was surprised by this, but you can install a driver and simply print to these printers. Or, at least, the one I purchased is that way.

    You can also use lp, lpr, or nc to send text and codes to it.

    Mine is connected to my network via Ethernet. No RPi is required to send stuff to it from any computer on the network.

    • corytheboyd 11 hours ago

      I imagine the software presented here does a lot more than proxy requests to a printer though. What sorts of payloads were you sending off to be printed? If it worked Good Enough for lightly formatted text, no-hosted is way better than self-hosted!

      • codazoda 9 hours ago

        I was printing two things...

        1. A plain text "progress report" that tells me some personal stats about my week last week.

        2. Full designs created in Affinity Designer, which print with the simple "print" menu. These can have any font, graphic, or whatever.

        I was able to send everything from plain text with a scroll and cut ESC/POS command on the end (my automated progress report), to an image sent directly to the printer queue, to a pixel perfect desktop design document.

  • pjc50 12 hours ago

    > I could see myself using something like this to print recipes.

    The home equivalent of a fast food kitchen ticket printer!

    I think this is a fun little project, but only until people discover how annoying thermal printers are in actual use, combining all the user-hostility of printers with a tiny form factor.

    If you want a really unique gimmick, you can get wireless bluetooth thermal printers that have belt loops. Intended as table-side receipt printers for waitstaff or ticket printers for transit.

    Another unique feature receipt printers often have that regular ones don't: a 24V pulse "kicker", intended for firing the release solenoid on cash drawers. I'm sure someone can find a use for that.

    (I spent some time in the POS software mines)

    • corytheboyd 11 hours ago

      > The home equivalent of a fast food kitchen ticket printer!

      Exactly where my head went haha, next thought was having a clip to hold the recipe up :p

  • throwanem 11 hours ago

    A regular printer, a binder, and a three-hole punch work fine. As a bonus, the printer is also useful in other ways, and any mementos produced with it will last in a way thermal paper never really does.

    • corytheboyd 11 hours ago

      Yes, it does, and we have one for some recipes. It’s bulkier than these would be, and we don’t have a lot of counter space. Also doesn’t solve the disposable problem. We have plastic sheets to protect the pages which works good enough, and it’s easy to print new pages if some get soiled anyway.

      I don’t want mementos, I want disposable references.

      It’s also not that big of a deal if this isn’t feasible, because the binder works fine, the phone works fine. This is just sparked a “hey, what if…” idea is all.

  • lionpixel 12 hours ago

    Once it's out of alpha you can self-host this project

    • corytheboyd 11 hours ago

      It sounded to me like once it’s out of alpha the pricing model is “TBD, but likely pay-per-print”.

      • lionpixel 11 hours ago

        I really like the proposal from black_puppydog here. Free forever self-host and a pay-per-print in case you want to have support or don't want to hassle with the infrastructure. Like Coolify is doing it.

        • corytheboyd 11 hours ago

          Sounds fine to me! I’d also be happy with a reasonable one-time payment for the self-hosted version.

  • calvinmorrison 12 hours ago

    <?php

    // Hardcoded token for authentication $authToken = 'your-secure-token-here';

    // Set the printer name (adjust to your printer's name) $printerName = 'YourPrinterName';

    // Allow only POST requests if ($_SERVER['REQUEST_METHOD'] !== 'POST') { http_response_code(405); echo json_encode(['error' => 'Method not allowed. Use POST.']); exit; }

    // Check for token in the request if (empty($_POST['token']) || $_POST['token'] !== $authToken) { http_response_code(401); echo json_encode(['error' => 'Unauthorized: Invalid token.']); exit; }

    // Check if a file was uploaded if (empty($_FILES['file']) || $_FILES['file']['error'] !== UPLOAD_ERR_OK) { http_response_code(400); echo json_encode(['error' => 'No file uploaded or file upload error.']); exit; }

    // Get the uploaded file path $uploadedFile = $_FILES['file']['tmp_name']; $fileName = basename($_FILES['file']['name']);

    // Use lp command to print the file $command = escapeshellcmd("lp -d " . escapeshellarg($printerName) . " " . escapeshellarg($uploadedFile)); exec($command, $output, $status);

    // Check the status of the command if ($status === 0) { http_response_code(200); echo json_encode(['success' => "File '$fileName' sent to printer '$printerName'."]); } else { http_response_code(500); echo json_encode(['error' => 'Failed to print the file.']); }

    • corytheboyd 11 hours ago

      I don’t think you can just send any document to a thermal printer and have it come out usable… there’s definitely value in software that can _convert_ arbitrary data to whatever format/dimensions/etc the thermal printer needs. Like the post mentions automatic dithering of images. Stuff like that. The HTTP glue is not the hard part.

xorcist 12 hours ago

> everyone gets 300 free prints per month during our beta

Ah, printer drivers. One of the things we do not yet rent. Makes sense.

  • lionpixel 12 hours ago

    Not fully decided on the payment yet. Thinking about going the Coolify route with self-hosted and cloud option or with pay what you use (seems more software tending to this one). Happy for any feedback!

rescripting 11 hours ago

The "Delete Account" button does nothing. Very clever user retention technique.

  • lionpixel 11 hours ago

    Sorry, this should definitely work. Try clicking on your avatar -> Manage Accounts -> Security -> Delete Account. Will look into this.