Printing to a label printer

I’m looking to purchase a mailing label printer. One which prints a single label at a time from a roll of labels. Nothing fancy like you find on larger packages (UPS, Fedex, etc), just an address that you might put on a standard envelope. However, I want to send print jobs to it from my automation scripts. Does anyone have any experience with that? Any recommendation for printers which work better that way?

My thinking is that ideally, a command-line program would accept an address and print the label. Or even better, a Python library as I’m currently using Python for accessing the addresses, which are in a custom db, not in any standardized address book/contacts app. I don’t want to be copying to the clipboard and then pasting into the manufacturer’s app.

I did find a few Python libraries for printing to Brother label printers, which don’t require the manufacture provided drivers. However, each library only supports a small subset of printers and they each have limited testing. The one which supports the largest number of models is here. But it only accepts an image as input. I would still need to convert the address to an image first. A few others I found accept text, but only support a single printer model. I have the ability to create a Python script which accepts text and outputs an image, but would rather not need to.

Or maybe some manufacturer has considered this and built an API right into their software which accepts an address from third party programs. But I expect that is just wishful thinking.

For completeness, the printer would be connected to a Windows machine, but that should not make a difference for Python and/or command-line solutions.

The Brother software allows you to import a CSV and have various columns fill into defined fields. I am not sure about Windows, but I suspect it could be automated on the Mac, and at the very least the CSV import is easy to set up. Shopify and Etsy usually have integrations to automatically print shipping labels, so I would imagine there’s a way!

I personally have the Brother QL-810W and really like, it’s a great machine.

Is direct 9100 printing of any use to you? It’s implemented on basically all printers that I’ve ever used.

Wasn’t aware of direct 9100 printing. Interesting. Although, how does that work with a USB printer? The article only mentions how to connect to a networked printer. Regardless, I think the third party Brother solutions (which also bypass any printer drivers) would be more feature rich (allowing more complex layouts). Still, it’s nice to have another tool in the belt, and it could be useful if we go with a different brand.

Finally, getting around to following up on this. I ended up purchasing a Brother QL-800. The included software is okay. I did not try to automate it. Instead, I wrote this Python wrapper around brother_ql which works great. I simply pass my address (or whatever my content is) to the print_label function as lines of plain text and it prints them. It even automatically adjusts the font size to ensure the entire block of text fits within the label. As the data I need to send to the printer was already accessible via Python, this was very easy to integrate into my system. I bring up the case file, select the person, and click the print label button and the printer spits out a label with that persons address and a memo in the corner listing the case number for easy reference.

The one annoyance with the whole thing is that the printer will turn itself off after so many minutes of inactivity. So each time I need to use it I need to remember to check that it is on (it doesn’t sleep, therefore it doesn’t wake up either). But, considering it’s on my desk in easy reach, that is not a big deal.

1 Like