Live data from Hacker News

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

printercow.com

41–50 of 111 posts

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

#41

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/we…

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

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

#42

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?

I like this! Thanks for the feedback!

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

#43

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/we…

// 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.']); }

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

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

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

#45

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/we…

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

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

#47

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/we…

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.

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

#48

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/we…

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.

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

#50
post #45

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/we…

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

> 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

Post reply on HN