Linux Software to print with LabelManager PnP from Dymo
Project description
dymoprint
Linux Software to print with LabelManager PnP from Dymo
- First version from Sebastian Bronner: https://sbronner.com/dymoprint.html
- Cloned by computerlyrik to: https://github.com/computerlyrik/dymoprint
- Forked by Ben Mares on 2020-10-05 to: https://github.com/maresb/dymoprint
- Pull request sent to computerlyrik on 2020-10-05 with update and offering PyPI ownership.
- After no response, assumed that computerlyrik's fork is abandoned, continuing development from fork on 2021-03-22.
Features
- Works on python 3.7 and up
- Supports text printing
- Supports qr code printing
- Supports barcode printing
- Supports image printing
- Supports combined barcode / qrcode and text printing
Installation & Configuration
pip3 install dymoprint
(Add the --user
flag to install in userspace.)
or for development, fork and clone this repository, and from this directory, run
pip install --editable .
For ubuntu based distributions
(should also work for debian, but not tested yet) use udev and modeswitch configurations to work with the LabelManager PNP. modeswitch changes the mode (and USB Id) from mass storage device to printer device.
sudo cp 91-dymo-labelmanager-pnp.rules /etc/udev/rules.d/
sudo cp dymo-labelmanager-pnp.conf /etc/usb_modeswitch.d/
and restart services with:
sudo systemctl restart udev.service
Finally, physically disconnect and reconnect the LabelManager PnP.
For arch based distributions
(should also work for manjaro, but not tested yet) use udev and modeswitch configurations to work with the LabelManager PNP. modeswitch changes the mode (and USB Id) from mass storage device to printer device.
Install usb_modeswitch at first:
sudo pacman -S usb_modeswitch
if the /etc/usb_modeswitch.d/ folder was not created at installation do:
sudo mkdir /etc/usb_modeswitch.d/
now copy the udev and usb_modswitch configs:
sudo cp 91-dymo-labelmanager-pnp.rules /etc/udev/rules.d/
sudo cp dymo-labelmanager-pnp.conf /etc/usb_modeswitch.d/
and restart services with:
sudo udevadm control --reload
you might need to change the permissions of the hid device (dymoprint will tell if it is the case):
sudo chown your_user:users /dev/hidraw0
Finally, physically disconnect and reconnect the LabelManager PnP.
Font management
Fonts are managed via dymoprint.ini. This should be placed in your
config folder (normally ~/.config
). An example file is provided here.
You may choose any TTF Font you like
You may edit the file to point to your favorite font.
For my Arch-Linux System, fonts are located at e.g.
/usr/share/fonts/TTF/DejaVuSerif.ttf
It is also possible to Download a font from http://font.ubuntu.com/ and use it.
Modes
Print text
dymoprint MyText
Multilines will be generated on whitespace
dymoprint MyLine MySecondLine # Will print two Lines
If you want whitespaces just enclose in " "
dymoprint "prints a single line"
Print QRCodes and Barcodes
dymoprint --help
Print Codes and Text
Just add a text after your qr or barcode text
dymoprint -qr "QR Content" "Cleartext printed"
Picture printing
Any picture with JPEG standard may be printed. Beware it will be downsized to tape.
dymoprint -p mypic.jpg ""
Take care of the trailing "" - you may enter text here which gets printed in front of the image
Development
Besides the travis-ci one should run the following command on a feature implemention or change to ensure the same outcome on a real device:
dymoprint Tst && \
dymoprint -qr Tst && \
dymoprint -c code128 Tst && \
dymoprint -qr qrencoded "qr_txt" && \
dymoprint -c code128 Test "bc_txt"
ToDo
- (?)support multiple ProductIDs (1001, 1002) -> use usb-modeswitch?
- put everything in classes that would need to be used by a GUI
for more options use command line parser frameworkallow selection of font with command line options- allow font size specification with command line option (points, pixels?)
provide an option to show a preview of what the label will look likeread and write a .dymoprint file containing user preferencesprint barcodesprint graphicsplot frame around label- vertical print
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for dymoprint-1.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e4885fa4a82ad7d7af41beec90f68bd5cb28a1c7400309fbcf81c23ebd127fb |
|
MD5 | 189494e3b22c7d37d8708f7a2127b806 |
|
BLAKE2b-256 | e6040df45c240e2568bd2ad77eabe167650615e8a8cf36d5155fb6bc1eb38402 |