I am somehow new to python coding, I am writing a program that creates barcodes and then prints them to a thermal Label Printer, I currently own a Brother QL700, drivers and all working.
The printer is located in /dev/usb/lp0 I have searched for days for any help on the Web of how to print from python but somehow without success or even an idea of where to start, so far I am able to create the barcode and save it as a image png or svg, but haven't been able to print even letters so far! Any help or guidance of where to start would be great! Thanks in advance
-
1Can you tried following this? howtogeek.com/169679/…Mohammad Ali– Mohammad Ali2016年09月10日 01:58:05 +00:00Commented Sep 10, 2016 at 1:58
-
Was not exact, but i managed to print by using Cups, If you like, post it as an answer so that I can mark it! Thanks!Ponchotg– Ponchotg2018年02月06日 14:36:24 +00:00Commented Feb 6, 2018 at 14:36
1 Answer 1
You can use this solution: Python package to control Brother QL label printers. This solution allows to perform printing without drivers for the raspberry and requires no additional opragramowania. You can easily to print directly to the printer.
-
That looks like a useful solution. The bit about adding oneself to the
lp
group is important for accessing USB printersscruss– scruss2016年12月22日 15:27:53 +00:00Commented Dec 22, 2016 at 15:27 -
@scruss I'm confused. Aren't
/dev/lpX
devices created by the printer driver? If the OP bypasses the driver, there's no reason to be inlp
group.Dmitry Grigoryev– Dmitry Grigoryev2017年07月17日 09:37:06 +00:00Commented Jul 17, 2017 at 9:37 -
No, they're most often created by udev. CUPS just grabs them if you have that port assigned to a CUPS-controlled printer. I work with cheap generic thermal printers quite a bit, and /dev/usb/lp0 appears whether I use CUPS or not. Adding oneself to the
lp
group just means you can write to it withoutsudo
.scruss– scruss2017年07月17日 12:12:07 +00:00Commented Jul 17, 2017 at 12:12