Brother QL-820NWB label printing

Hopefully someone can advise me on this as I feel like I've hit brick wall after brick wall!

I'm attempting to set up a Brother QL-820NWB to print off ID labels for different items based on information from a SQL DB.

So far I've been unable to send a job to the label printer as it comes up with an error but I've been able to use the Brother b-PAC software with some VBA script which works as I require but I'm not sure how to re-crate this using JYTHON.

The VBA script is shown below. There's a template saved in the path detailed in the script.

This may be a bit rudimentary for some but as I'm new to ignition and JYTHON any help would be appreciated.

I usually install the applicable printer driver on the gateway, create a label with Ignition's reporting module, then use system.report.executeAndDistribute() to print it.

1 Like

This code is basically useless because it's not really doing anything - all the work is being done by some "bpac.Document" object from a library.

Does Brother offer a Java or Python library? or some other documentation for how to interface with these printers?

A python library is available brother_ql is the library I've come across on Stack. After trying this I get an error about builtins not being available when the raster script is run. I believe this is something to do with it requiring Python3.

I have come across a JavaScript example that also works but JavaScript is not a language I've dealt with yet.

bpac - Jumpshare

I believe brother_ql is geared for python 3, and Ignition is stuck at v2.7. The JavaScript isn't going to help you either. Any reason you don't want to use a driver/report?

I'm just looking into the suggestion you made regarding system.report.executeAndDistribute().

I've not come across it before in the context of printing, just reading up on it now.