The Brother PTouch QL series of printers have USB interfaces and are capable of printing QR codes. Here's a typical model:
http://www.ptouchdirect.com/ptouch/new_ql570.html
How can I prepare input (i.e. format) for these printers and talk to them directly from my program? I'm interested in Windows, Mac, Linux platforms. Any language, a Python library would be perfect.
I don't want to generate output (e.g. CSV) and ask the user to load that into the Brother-supplied application.
I have used the iText library for printing QR barcodes. It can generate the barcode image and put it in a PDF file, which the user can send to the printer. It is a Java based library and there is also a .NET port available.
I can't speak about Windows, but Brother traditionally has very comprehensive Linux support. Here's the driver list for the PTouch models. With these drivers in place, you can print through CUPS (via the lp
or lpr
commands) using whatever darn file format you find is convenient for you.
OS X also uses CUPS, so printing to it would be pretty similar as on Linux... given that you can find the correct drivers.
There is a brotherprint package, part of pypi:
https://pypi.python.org/pypi/brotherprint/0.1.1
It will supposedly handle sending sockets, but I have not tried it:
import re
'''Brother Python EscP Command Library
Description:
A collection of functions to more easily facilitate printing to the Brother QL label
printers without having to memorize the ESC/P commands. Also handles sending to sockets
for you.
'''
class BrotherPrint:
font_types = {'bitmap': 0,
'outline': 1}
def __init__(self, fsocket):
self.fsocket = fsocket
self.fonttype = self.font_types['bitmap']
see: https://github.com/fozzle/python-brotherprint/blob/master/brotherprint/brotherprint.py
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With