User Tools

Site Tools


Writing /var/lib/dokuwiki/data/meta/tutorials/labeler.meta failed
tutorials:labeler

Using the brother pt1230 label printer

git clone https://gitlab.com/arcoslab/pt1230
  • Use the included Makefile to compile it and install it: (check its dependencies)
cd ~/local/src/gitlab/arcoslab/pt1230
make
export PREFIX=${HOME}/local/DIR/pt1230
make install
cd ~/local/DIR/
xstow pt1230
  • textlabel generates images in bitmap format from text. For example:
textlabel --font "Times New Roman" "test" | pt1230 -d /dev/usb/lp1 -b
  • This generates a bitmap image for “test” and it will be sent to the printer using the pt1230 command.

Multiline text

  • For multiline text use text-multi-line instead of textlabel. For example:
text-multi-line -f "Courier New:bold" -s 100  "line1
line2
line3
line4" | pt1230 -d /dev/usb/lp1 -b -c
  • This command generates a bitmap image with the text “line1 line2 line3 line4” separated in 4 lines and each centered. It automatically adjusts there size. The result is sent to the printer with pt1230 command.
  • “-c” option of pt1230 command avoids the printer to “feed” the tape. It conserves tape because for each print it normally feeds a lot of empty tape to allow to cut it correctly. Use the “-c” option as much as possible before ending printing. Then “feed” at the last print to cut correctly.
  • You can print barcodes with this labeler using:
bincodes -e 39 -b "1" "2343452345325452345" | line2bitmap

Printing graphics

  • Create your preferred logo in inkscape
  • Be sure to rotate the image so that the width of the printer tape is in the x axis.
  • Convert to two colors: black and white. (using the object properties)
  • Export to png. Use a x resolution of 64 pixels
  • Open in gimp.
  • Layer→Transparency→Remove Alpha Channel
  • Colors→Threshold
  • Select a threshold that produces a nice printable image (specially if it contains fonts)
  • Export to xbm file format.
  • Convert to pt1230 format with:
bmtoa -char 01 filename.xbm
  • pipe it to pt1230 for printing:
bmtoa -char 01 filename.xbm | pt1230 -d /dev/usb/lp1 -b -c
tutorials/labeler.txt · Last modified: 2022/09/20 00:08 (external edit)