Using the Command Line Tool

This package comes with a versatile command line (CLI) tool. Just like the package, it’s called brother_ql.

brother_ql

Command line interface for the brother_ql Python package.

brother_ql [OPTIONS] COMMAND [ARGS]...

Options

-b, --backend <backend>
-m, --model <model>
-p, --printer <printer>

The identifier for the printer. This could be a string like tcp://192.168.1.21:9100 for a networked printer or usb://0x04f9:0x2015/000M6Z401370 for a printer connected via USB.

--debug
--version

Show the version and exit.

Environment variables

BROTHER_QL_BACKEND
Provide a default for -b
BROTHER_QL_MODEL
Provide a default for -m
BROTHER_QL_PRINTER
Provide a default for -p

analyze

interpret a binary file containing raster instructions for the Brother QL-Series printers

brother_ql analyze [OPTIONS] INSTRUCTIONS

Options

-f, --filename-format <filename_format>

Filename format string. Default is: label{counter:04d}.png.

Arguments

INSTRUCTIONS

Required argument

discover

find connected label printers

brother_ql discover [OPTIONS]

info

list available labels, models etc.

brother_ql info [OPTIONS] COMMAND [ARGS]...

env

print debug info about running environment

brother_ql info env [OPTIONS]

labels

List the choices for –label

brother_ql info labels [OPTIONS]

models

List the choices for –model

brother_ql info models [OPTIONS]

print

Print a label of the provided IMAGE.

brother_ql print [OPTIONS] IMAGE [IMAGE] ...

Options

-l, --label <label>

The label (size, type - die-cut or endless). Run brother_ql info labels for a full list including ideal pixel dimensions.

-r, --rotate <rotate>

Rotate the image (counterclock-wise) by this amount of degrees.

-t, --threshold <threshold>

The threshold value (in percent) to discriminate between black and white pixels.

-d, --dither

Enable dithering when converting the image to b/w. If set, –threshold is meaningless.

-c, --compress

Enable compression (if available with the model). Label creation can take slightly longer but the resulting instruction size is normally considerably smaller.

--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.

--600dpi

Print with 600x300 dpi available on some models. Provide your image as 600x600 dpi; perpendicular to the feeding the image will be resized to 300dpi.

--lq

Print with low quality (faster). Default is high quality.

--no-cut

Don’t cut the tape after printing the label.

Arguments

IMAGE [IMAGE] ...

Optional argument(s)

Environment variables

BROTHER_QL_LABEL
Provide a default for -l

send

send an instruction file to the printer

brother_ql send [OPTIONS] INSTRUCTIONS

Arguments

INSTRUCTIONS

Required argument