Search Site:








Edit - To Do - AllRecentChanges

Recent Changes Printable View Page History Edit Page

Perl Programmatic interface to the QL550 Label Printer

You can download below the work done by Ralf Muschall () based on the current protocol findings and the beginning of a Perl Interface I started to code but never had time to advance much.

His package will allow feeding a raw PBM image to a Perl script for printing directly to the printer.

Ralf did a hand-coded PostScript file that can be used as a template to feed to gs for producing the necessary image.

Please send your comments, fixes, improvements, related work so I can place them on this website for all to find.
See the QL550LabelPrinterCUPS page if you are looking for a cups driver.

All the necessary information is self-contained.

Many thanks to Ralf for his very usefull contribution.

MD5: c3c43e07e2086af83fba8099e6740685

Note: this will only work on linux machines that implement the /dev/usb/lpx interface to usb printing devices. Any fairly recent linux distribution should work.

Comments 02 December 2005, at 00:29 GMT+8 [X]
Hi, I have just successfully downloaded and made use of your perl scripts to run the brother QL550 label printer.˛Most impressed! :D˛˛It is now fully working among our network, I have split the job up into 2 sections, retreiving an ascii file, sending it through CUPS to a workstation which builds the .pbm file and then prints out on the USB port to the printer, works a treat :)˛˛Would be nice to have drivers which could be ran direct from OpenOffice, but the way I've done it creates a standard to which everyone needs to stick to :)
ralf@lipsia.deTuesday 20 December 2005, at 20:37 GMT+8 [X]
Running from OOO should not be a problem - just write a script which does the work and make it known to OOO via spadmin, after which the script appears as a virtual printer. Of course, you have to handle the limited pixelsize somehow (i.e. scaling or cropping).
Frank Menke fmenke1@fuse.netFriday 03 March 2006, at 15:00 GMT+8 [X]
I too have been able to use the perl scripts, but if the images have a linefeed value (\x0A) in them it bombs. I am looking into the issue. It is probably the way PERL handles strings. Probably need to read the data in with something other that substr.
kdun@dunyong.comSunday 20 August 2006, at 20:24 GMT+8 [X]
i am trying to get the perl script to work for 29x90mm labels but have not had any luck so far. i get errors at line 212 and 227. if anyone could tell me why, i'd appreciate it. also is it possible to only send the label data once to the printer and have it print multiple labels? any help would be appreciated.
RenaudTuesday 05 September 2006, at 09:06 GMT+8 [X]
Hi kdun, what error exactly do you get?, the lines you mention seem pretty innocuous to me, nothing really special happens there so the error message is quite important to find out. The printer does not have an internal memory to reprint labels. To print multiple labels, you need to send them multiple times.
pentikeSaturday 27 February 2010, at 17:38 GMT+8 [X]
Hi! I have tried it with the included test template and it works great for P-touch QL-560 as well.
pentikeSunday 28 February 2010, at 15:47 GMT+8 [X]
I have accidentally created a file that could not be parsed by the driver. There was some problem in the regexp matching. Here is a small patch that fixed the problem. --- 2005-05-19 09:07:00.000000000 +0200 +++ patch/ 2010-02-28 16:36:53.000000000 +0100 @@ -198,8 +198,9 @@ bmcontent =~ s/\#[^\n]*\n/\n/m; my ($width,$height,$data); # we eat only pbmraw (P4), not pbm-ascii (P1) - if (bmcontent =~ /(P4)\s+([0-9]+)\s+([0-9]+)\s(.*)/m) { - $width=$2; $height=$3; $data=$4; + if (bmcontent =~ s/(P4)\s+([0-9]+)\s+([0-9]+)//m) { + $width=$2; $height=$3; $data=bmcontent; } else { die "broken PBM: head=$1 w=$2 h=$3"; }
Enter your comment (no links allowed): Author:

Edit Page - Page History - Printable View - Recent Changes - WikiHelp - Search - RSS -
Page last modified on Wednesday 01 February 2006, at 08:30 GMT+8 - Viewed 3918 times