Open jmcwhirter opened 5 years ago
Update:
lp logo.bin
from my Mac. Red light flashed and no print. - FAILI am currently just getting started with using this library with the QL-800. Currently working through the code running on a Pi 3B+, but can do some basic prints using code similar to this:
import brother_ql
from brother_ql.raster import BrotherQLRaster
from brother_ql.backends.helpers import send, discover
# Using USB connected printer
PRINTER_IDENTIFIER = '/dev/usb/lp0'
printer = BrotherQLRaster('QL-800')
filename = "/home/pi/Documents/test.png"
print_data = brother_ql.brother_ql_create.convert(printer, [filename], '39x90', dither=True)
send(print_data, PRINTER_IDENTIFIER)
Make sure the "Editor Lite" button is not active, for me it won't show up on USB with that on. Maybe we can help each other with this printer! Edit: Also I get the flashing Red LED when printing too. What I do is open the top and close, and it usually prints. However the code isnt getting the message that it printed successfully, so working on that...
I'm on Ubuntu using Python3. Running into the same issue but when I open top and close, it does not print. Running a 17x87 label and testing with resized images. The error i'm getting is "Replace media error"
Edit: Prints fine using sako0938's code. The label was the wrong size (i measured the face of it and did not look at the actual size).
I have gotten prints working on my Ubuntu PC, and on Raspberry Pi with this code. So far I need to re-initialize the printer object before every print:
import brother_ql
from brother_ql.conversion import convert
from brother_ql.raster import BrotherQLRaster
from brother_ql.backends.helpers import send, discover
# Pyusb backend
PRINTER_IDENTIFIER = discover('pyusb')[0]['instance']
# Linux Backend
# PRINTER_IDENTIFIER = '/dev/usb/lp0'
# Need to create new qlr object for each print
qlr = BrotherQLRaster("QL-800")
qr_data = convert(qlr,["/home/youruser/Desktop/yourpic.png"],"29x90")
send(qr_data, PRINTER_IDENTIFIER)
Edit: The QL-800 comes with two types of tape, 62mm continues and 29mmX90mm. This code works great with the 29mm x 90mm, but I still get blinking red LED for 62mm continuous.
Interesting stuff! I was being too stubborn and didn't try different sized paper or the Python library. I'll have to give this a shot. Thanks for the info!!!
Looks like you've got this sorted but I've noticed that if I try to print from P-Touch and have selected a different size print to the loaded label the same error - flashing red light - occurs.
Am late on this but the provided 62mm continuous tape for the QL-800 is a reb/black tape.
As the command's help states, if you are printing on a red/black tape you must pass the --red
flag:
--red Create a label to be printed on black/red/white tape
(only with QL-8xx series on DK-22251 labels). You must
use this option when printing on black/red tape, even
when not printing red.
So if you are using the 62mm tape that was included in the package, this flag will solve your problem.
I had the red blinking power light, too. I was specifying the wrong label size!
Setup...
pip3 install --upgrade brother_ql
export PATH="${PATH}:~/.local/bin"
sudo lsusb -v
Steps I took...