dylol: Dymo LMPC/-2 On Linux

This is not a Dymo publication. The author is not affiliated with Dymo in any way -- other than being the prowd owner of some Dymo products.

This is the dylol webpage, and also the included readme.html. If you are reading this off-line, please check for updated information at the dylol webpage: http://www.opensourcepartners.nl/~costar/dylol

dylol is a small collection of tools that provide 100% functionality of the Dymo LabelManager PC-II label tape printer on Linux -- and probably on BSDs such as FreeBSD/OpenBSD/NetBSD, and any other more or less UNIX-compatible OS out there. Your OS needs to support the standard USB printer class, then a tool from the dylol collection translates standard .pbm image files to LMPC-2 binary format. And when you have a reasonably complete *UX-like installation, you can easily print multi-line text labels directly from the command line.

NOTE: The original LabelManager PC (-1) may or may not work since I have no way of finding out. IF it uses the same simple binary format, then it is also supported. I assume that it will work, and all text is written based on that assumption, but I'd welcome short works/fails reports.
 

Download:

dylol-1.01.tar.gz  (293 kB)

License: GNU GPL 2 or higher.
 

About the LMPC and LMPC-2

Dymo's LabelManager label tape printer series use heat to transfer ink from an ink ribbon to the label tape. Where Brother's comparable P-Touch range transfers the ink to the backside of a transparent tape that is subsequently stuck onto a both-sides-sticky colored tape, Dymo's LabelManagers transfer the ink directly to the colored tape that is just single-side-sticky. This leaves no chance for misalignment of the tapes that Brother machines are prone to, while the result doesn't appear any less durable than Brother's "laminated" solution.

To provide the heat needed to transfer ink from the ink ribbon to the label tape, a print head is used with 96 (LMPC) or 128 (LMPC2) individual heater elements. Combined with the tape transport mechanism, a resolution of 180 dpi horizontal and vertical is realized. Since the heater elements take time to reach the required temperature, also need time to cool down again (all while the tape moves), and since some heat is radiated further than the ideal boundary, pixels on the printed tape are actually a bit larger than they "should" be. That is, a 50% on-off pixel pattern will give 70% gray or so. However, printing gray is not a good idea, since the tape transport mechanism operates slightly uneven causing unsightly vertical banding in the printout (when holding the tape horizontally). An example and scan is provided in the dylol package. Fortunately this is totally invisible when printing text and line art.

The temperature needed to fully transfer the ink from ribbon to tape varies depending on ink and tape colors. The handheld and desktop "typewriter" LabelManagers provide a "Contrast" control to adjust the print head temperature, adjustment also being needed when operating in very hot or very cold environments. The LabelManager PC printers do not have direct contrast control but require setting the ink-tape combination in the print file. No autodetection mechanism is available. (The D1 tape cassettes only provide for tape width "auto"detection -- manually, mostly -- but this seems to have been abandoned in most recent LabelManager models including the LMPC2, allowing us to print tapes up to and even over their full width.)

The LMPC is a very dumb printer (to keep it cheap, probably). It will print always. Even when no tape is inserted. Even when the tape compartment is open. Even when the tape cutter is pressed in. So it probably isn't the best idea to use it as a network printer, especially if users cannot see the printer at the moment they are sending jobs to it.
 

Included:

pbm2lmpc - Translates binary .pbm image files to the LMPC print format.

If you didn't already know, the PBM "Portable BitMap" image format is probably the most simple data format for black-and-white images. Many image editors should be able to write it directly. Some, like... the Gimp (ouch), don't. Not to worry though, since the *UX-standard netpbm package provides an easy converter for many formats to PBM. Of course there's ppmtopgm to convert PPM "Portable PixMap" (=full-color) to PGM "Portable GrayMap" (=grayscale), followed by pgmtopbm to convert PGM to PBM. But also pngtopnm and jpegtopnm. See their respective manpages for details.

pbm2lmpc takes binary PBM images (and only those) from stdin, and produces LMPC-formatted output on stdout. You can send this directly to /dev/usb/lp0 or whatever your LMPC is called. In case you're curious, the print format is documented in Format.txt.

Input is required to be vertical, i.e. maximally 96 (LMPC) or 128 (LMPC2) pixels wide and unlimited pixels high. The printer will then print the image top-down. So for most "normal" labels with a horizontal line of text, you should first rotate the image before passing through pbm2lmpc. pnmflip -cw will easily do that for you. (But see dytextlab for easier one-command text label generation.)

Input that is wider than 96/128 pixels is rejected. This prevents you from accidentally printing non-rotated images. A switch is available to override this sanity check.

For optimal results, always set the correct ink/tape combination with the "-i" option. This adjusts the print head temperature. The paper size (label width) can also be set, but doesn't seem to have any effect.

See "pbm2lmpc -h" for the complete list of options.

 
dypbmfixmargins - Adjusts margins to minimal-length centered label.

This simple script, modeled after netpbm's pnmmargin, reads a PBM image from stdin, strips all fully white rows from top and bottom, and then adds minimal top and bottom margins as required by the LMPC. This means that, in general, you don't have to worry about the label width (horizontally spoken). In your favourite drawing program, just mind the label height, which is always the same, and leave as much whitespace left and right as you like: pnmflip -cw | dypbmfixmargins will fix it automatically.

So, always use dypbmfixmargins before sending to pbm2lmpc. Unless, of course, you want full manual control over the label length.

 
dyeps2pbm - Easily convert .eps to .pbm format.

This is a quick helper script, primarily intended for use with vector drawing programs that produce (correctly scaled) .eps output. Such as the venerable xfig. See inside the script for the commandline to convert .fig directly to .pbm, and some configurable options. Note that the output PBM image is already flipped for your convenience.

In the xfig/ directory are Xfig templates for all supported tape sizes. The white top/bottom boundaries indicate the usable tape height. Some tapes are larger than the print head, and can't be printed fully; in those cases pay close attention to the "tape height indicators" left and right. You can easily cross over the left and right lines for longer labels; dypbmfixmargins will fix the margins. But you should not cross the top and bottom boundaries since that would cause the LMPC to print on the roller, which isn't advisable.

Note that you don't have to delete the white objects before Exporting to Encapsulated PostScript (.eps), since they will end up as white=unprinted pixels. But you shouldn't even use Export anyway, since the complete commandline in dyeps2pbm is much quicker.

The Xfig templates are centimeter-based. It may not be a good idea to convert to inches, since metric prints at 1143 figdots per inch and imperial prints at 1200 figdots per inch. Furthermore, tape widths seem to be specified in exact millimeters, and only translated to approximate inch fractions. YMMV.

 
lprng-filter - Print filter for the LPRng print spooler system.

If you are using the LPRng print spooler system, this filter can make your life a bit easier. It moves dypbmfixmargins and pbm2lmpc into the print spooler so that you can directly print .pbm files. This all without losing any flexibility, because LPRng's lpr has a brilliant -Z option that allows passing arbitrary options to the print filter(s), even across hosts. The lprng-filter script parses those "Z-options" as documented in the script itself.

In the script is also an example /etc/printcap entry, and some defaults that you can adjust to your situation.

lprng-filter calls pbm2lmpc with the -t option. This means that you can also directly print LMPC print files (passthrough) as long as you print with "lpr -Znomargins".

 
dytextlab - Very flexible multi-line text label generator.

This program, which actually is an elaborate shell script with some PostScript goodness included, is your one-stop solution to generate and print text labels.

Features:

When you have lprng-filter installed as described above, you can directly print your labels with for example "dytextlab -Pdymopbm 'PUSH' 'to close'" and even use "-Z" options.

dytextlab uses ghostscript rendering via dyeps2pbm, so it can use any fonts that ghostscript handles. For example fonts in PostScript's original "Type 1" format. Not many free "Type 1" fonts are available, but with some searching we find this listing which points to many fonts -- without previews...

There are far more "TrueType" format fonts available, since they are used on both "Other OSes". Modern ghostscript can also handle TrueType, but then the font has to be re-packed in the proper PostScript "Type 42" format. Many tools are available for this, listed here and also on this older page. I succesfully tried ttfps-0.3.tar.gz, which is a stand-alone program (requires a small Makefile adjustment on little-endian systems). Free TrueType fonts to try it out are available everywhere, such as here. WARNING: Since TrueType fonts have a "high search volume", chances are that some font collection maintainers may have less honorable intentions. Browse only with fully patched, secure browsers.

See dytextlab -h for the complete list of options.

 
misc/feed* - Printfiles to advance tape.

For various reasons, you might want to just advance the tape without printing anything. The feed* files do exactly that. The .lm files are directly printable. For example, when you printed some labels back-to-back without margins, you can use feed-endmargin.pbm.lm to append the standard end margin.

When you leave the label tape in the printer unused for a long time, you will notice that it gets a bit deformed by being bent around the print head and the roller. With feed-crease-past-cutter.pbm.lm, you can advance the tape so that the deformation can be easily cut off. You will probably need some pointy object to retrieve the small cut-off piece from the tape exit opening. However, note that cutting off the crease is not needed in most situations, as the tape is sticky enough to make the crease completely invisible when stuck onto a solid object.

You will have noticed that the LMPC has a tiny sensor/switch that causes the ink ribbon to be advanced as soon as a new tape cassette is inserted. If you always use the same tape cassette, that's no problem. But if you often change tape cassettes to print short labels on various tape colors, the auto-advancing becomes annoying because the advancement is large enough that you might run out of ink ribbon long before you run out of label tape. The solution is to simply disconnect the power cord when changing the tape cassette. However, even if you pay close attention that the ink ribbon is pulled tight when inserting the cassette, there is always a bit of slack introduced by the internal printer mechanism. This results in a slightly compressed left edge of the first printed label. Therefore, if you change tape cassettes with the power cord disconnected, reconnect the power cord before closing the tape compartment, print feed5mm.pbm.lm to tighten up the internal mechanism, and only then close the tape compartment. This procedure will leave you with much more usable ink ribbon than the factory-default solution.

 
lmpc2pbm - Convert LMPC print file back to PBM image.

Diagnostic tool, written before all the others, to emulate the LMPC printer before I had one. Together with misc/lmpc2dump, this was used to study print files that were made for me using the M$Win printer driver.
 

Notes for distribution maintainers:

There is no "make install". Most people will happily populate ~/bin or /usr/local/bin themselves. But for packaging in distributions, you might want to put the following in /usr/bin: dyeps2pbm, dypbmfixmargins, dytextlab, and pbm2lmpc. You can put dytextlabrc(.example) in /etc, possibly along with lprng-filter (renamed). All the rest (including lmpc2pbm) can go under /usr/share/doc/dylol/. You may want to install gimp/ as .tar.gz (~9kB instead of ~580kB).

When installing, take good note of hardcoded/calculated paths in the various scripts. Change where needed.

If you want a completely functional dylol installation, the following other software is required: the netpbm suite and a suitable ghostscript variant, further bc, od, sed, tr and tempfile. See inside the various scripts for more details. While not required, Xfig with transfig and the Gimp would be good suggestions.
 

Contact:

I'm sorry, but I usually don't have time or opportunity to properly reply to mails. That's (part of) why the above description is rather elaborate. If you aren't discouraged enough, you can try to reach me at J.A.Bezemer@opensourcepartners.nl. Start the subject with "Dymo", to keep it separated from the spam.

All mentioned trademarks and registered trademarks are the property of their respective owners. No infringement is intended. ]