/Print2BLE

MacOS app which allows drag and drop of images to BLE thermal printers

Primary LanguageObjective-CApache License 2.0Apache-2.0

Print2BLE

Copyright (c) 2021 BitBank Software, Inc.
Written by Larry Bank
larry@bitbanksoftware.com

Print2BLE
What is it?

This project is a MacOS GUI application to print image files on inexpensive Bluetooth Low Energy thermal printers. It allows you to drag supported image files (e.g. JPEG, PNG, BMP, TIFF, GIF) onto a window, convert them to 1-bpp dithered and then send them to the printer.

Why did you write it?

I've been experimenting with BLE thermal printers on microcontrollers and wanted to explore BLE client (central) programming on MacOS to talk to these same devices. This then morphed into the idea of making a simple drag+drop app to allow printing of images. By sharing this code, hopefully other people will find it a useful resource for info about BLE programming, manipulating images, and communicating with 'unsupported/undocumented' thermal printers.

How to use it?

Upon running the app, you will be presented with a window containing 2 push buttons. The connect button will scan for supported printers and connect to the first one it finds. The status text will update to show that it connected to the named device. Next, drag an image onto the window from the Finder. A preview will display how it will look on paper. If you're satisfied with the results, press the print button.

What printers does it support?

It currently supports the GOOJPRT PT210/MTP-2, MTP-3, 'cat/pig/panda' and PeriPage 304pi A6. As I get info for other printers, I'll add support for them too.

If you find this code useful, please consider becoming a sponsor or sending a donation.

paypal