Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


txt2img and imgprint -- programs to drive a Dymo LabelManager PNP

by Roger Bell_West (roger at

Updated versions of this software may be available from

The Dymo LabelManager PNP is a very fine small tape printer,
conveniently sized and priced for someone like me who has low-volume
label-printing needs.

Unfortunately, because it registers on USB as a HID rather than as a
printer, the Dymo-supplied Linux drivers are of no use with it.

However, the printing protocol is similar to that used on the larger
LabelMaker printers, and writing a program to access it at low level
isn't too hard.

Sebastian Bronner got there first with his dymoprint: which is a great starting point, but
wasn't quite what I wanted: it can only produce lines of text in a
single font. In the tradition of Unix programs, I wanted to split the
functions: one program to convert text to bitmap, and another to send
the bitmap to the printer. That way I could use an image editor in
between to add barcodes, multiple fonts, and whatever other functions
I wanted.

Also I like Perl.

And thus txt2img and imgprint. Both of these programs will need the
non-core Imager module (on Debian, apt-get install libimager-perl).

txt2img takes one or more lines of text and an optional font
specifier, and produces a bitmap:

$ txt2img -f /path/to/font.ttf "line one" "line two" "line three"

By default it writes to txt2img.png; -o will change this. It scales
the text to 64 pixels, this being the resolution of the LabelManager
on 12mm tape.

Multiple lines are centred by default; to change this, use "-a l" to
align left or "-a r" to align right.

To increase inter-line spacing, use "-g N" to specify a pixel gap of N.

imgcombine takes several images and combines them into a single one;
for example, you could have a text label from txt2img followed by a
piece of clip-art. -o determines the output file (imgcombine.png by
default). An image that is 64 pixels wide but not high will be
rotated 90 degrees; otherwise it will be scaled to fit.

$ imgcombine file1.png file2.png

imgprint takes a 64-pixel-high image, crudely converts it to
black-and-white if necessary, and outputs it to an attached
LabelManager PNP. If it doesn't find one, it will fail with an error;
you can use the -d option to specify a particular device (or even a
plain file).

Use the "-s" option to print a short label. This will advance the label
past the cutter, but will not include the equal blank space after the
cutter that forms the left margin of the next label to be printed. The
next label printed will be right up at the leading edge of the tape. If
you use this every time, the labels will come out as:

[TEXT    ][TEXT    ] etc.

which may be helpful if you plan to trim off the blank parts anyway.

$ imgprint txt2img.png

If you get a permission error, add a file 50dymo.rules in
/etc/udev/rules.d that reads:


then, still as root,

udevadm control --reload-rules && udevadm trigger

Feature requests are welcome.


Drive a Dymo LabelManager PNP from Linux



No releases published


No packages published