Bug#555892: RFP: ptouch-driver -- CUPS/Foomatic driver for Brother P-touch label printers

2009-11-12 Thread Lars Wirzenius
Package: wnpp
Severity: normal

http://www.diku.dk/hjemmesider/ansatte/panic/P-touch/ has the program
ptouch-driver, which is a driver for CUPS and Foomatic for Brother
P-touch label printers.

I made a quick-and-dirty package for myself, diff.gz attached. Note that
I am _not_ willing to maintain this myself, unfortunately. I will soon
be far away from my label printer.

The diff contains a fix that works for at least the QL-550 model, which
seems to have 275 dpi pixel density along one axis, and 300 on the
other. The upstream code assumes 300 for both. The incorrect density
makes the label cutter cut at the wrong place (in the middle of a label,
rather than between them). I've informed the upstream author of this.

Other than that, the package is extremely straightforward to make, using
dh (or cups, I assume).

When I installed my package, and added the printer via the GNOME printer
admin tool, it generated a PPD file in /etc/cups/ppd/Brother-QL-550.ppd,
which works otherwise fine, but the ImageableArea settings are wrong,
and make it impossible to print near the edges of the labels. I fixed
this by editing the file manually, since I could not figure out how that
file gets generated and fix the source of the wrong settings. I'm
attaching the manually edited file as well. Someone who understands the
whole CUPS system should figure out the proper fix.



ptouch-driver_1.3-1.diff.gz
Description: GNU Zip compressed data
*PPD-Adobe: 4.3
*%
*% For information on using this, and to obtain the required backend
*% script, consult http://www.openprinting.org/
*%
*% This file is published under the GNU General Public License
*%
*% PPD-O-MATIC (4.0.0 or newer) generated this PPD file. It is for use with 
*% all programs and environments which use PPD files for dealing with
*% printer capability information. The printer must be configured with the
*% foomatic-rip backend filter script of Foomatic 4.0.0 or newer. This 
*% file and foomatic-rip work together to support PPD-controlled printer
*% driver option access with all supported printer drivers and printing
*% spoolers.
*%
*% To save this file on your disk, wait until the download has completed
*% (the animation of the browser logo must stop) and then use the
*% Save as... command in the File menu of your browser or in the 
*% pop-up manu when you click on this document with the right mouse button.
*% DO NOT cut and paste this file into an editor with your mouse. This can
*% introduce additional line breaks which lead to unexpected results.
*%
*% You may save this file as 'Brother-QL-550-ptouch.ppd'
*%
*%
*FormatVersion: 4.3
*FileVersion:   1.1
*LanguageVersion: English 
*LanguageEncoding: ISOLatin1
*PCFileName:BRQ550PT.PPD
*Manufacturer:  Brother
*Product:   (QL-550)
*cupsVersion:   1.0
*cupsManualCopies: True
*cupsModelNumber:  2
*cupsFilter:application/vnd.cups-postscript 100 foomatic-rip
*cupsFilter:application/vnd.cups-pdf 0 foomatic-rip
*cupsFilter:application/vnd.apple-pdf 25 foomatic-rip
*%pprRIP:foomatic-rip other
*ModelName: Brother QL-550
*ShortNickName: Brother QL-550 ptouch
*NickName:  Brother QL-550 Foomatic/ptouch (recommended)
*PSVersion: (3010.000) 550
*PSVersion: (3010.000) 651
*PSVersion: (3010.000) 652
*PSVersion: (3010.000) 653
*PSVersion: (3010.000) 704
*PSVersion: (3010.000) 705
*PSVersion: (3010.000) 800
*PSVersion: (3010.000) 815
*PSVersion: (3010.000) 850
*PSVersion: (3010.000) 860
*PSVersion: (3010.000) 861
*PSVersion: (3010.000) 862
*PSVersion: (3010.000) 863
*PSVersion: (3010.000) 864
*PSVersion: (3010.000) 870
*LanguageLevel: 3
*ColorDevice:   False
*DefaultColorSpace: Gray
*FileSystem:False
*Throughput:1
*LandscapeOrientation: Plus90
*TTRasterizer:  Type42
*1284DeviceID: MFG:Brother;MDL:QL-550;CMD:PT-CBP;DRV:Dptouch,R1,M0,TF;

*driverName ptouch: 
*driverType F/Filter: 
*driverObsolete: False




*HWMargins: 18 36 18 36
*VariablePaperSize: True
*MaxMediaWidth: 10
*MaxMediaHeight: 10
*NonUIOrderDependency: 100 AnySetup *CustomPageSize
*CustomPageSize True: pop pop pop
/PageSize [ 5 -2 roll ] /ImagingBBox nullsetpagedevice
*End
*ParamCustomPageSize Width: 1 points 36 10
*ParamCustomPageSize Height: 2 points 36 10
*ParamCustomPageSize Orientation: 3 int 0 0
*ParamCustomPageSize WidthOffset: 4 points 0 0
*ParamCustomPageSize HeightOffset: 5 points 0 0

*FoomaticIDs: Brother-QL-550 ptouch
*FoomaticRIPCommandLine: gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPA
USE -sDEVICE=cups %A%Z -sOutputFile=- - | rastertoptch dummyjob dummyu
ser dummytitle 1 apos;%Bapos;
*End

*OpenGroup: General/General

*OpenUI *PageSize/Page Size: PickOne
*OrderDependency: 100 AnySetup *PageSize
*DefaultPageSize: StandardAddressLabel
*PageSize Binder3cmSpineTape/Binder 3cm - Spine Tape (29 x 209mm): 
/PageSize[82 592]/ImagingBBox null/MediaType (roll)setpagedevice
*PageSize Binder5cmSpineTape/Binder 5cm-Spine Tape (62 x 209mm): 
/PageSize[176 

Bug#555892: RFP: ptouch-driver -- CUPS/Foomatic driver for Brother P-touch, label printers

2009-11-12 Thread Till Kamppeter

Thank you for your work on packaging the ptouch driver.

I have tried it and I have done the following changes:

1. I have corrected the upstream version number of the Debian package. 
It must be 0.13.


2. I have added a margin definition to the driver/ptouch.xml file 
assuming zero margins. Now the PPD coming out is the same as your 
hand-edited PPD.


I did not do the following yet, but I would do it when making a Ubuntu 
package:


1. The 2 changes in the original source code should be supplied as patches

2. There should be a post-install script updating the PPD files of 
already existing print queues as all Ubuntu printer driver packages have.


The new ptouch-driver_0.13-1.diff.gz is attached. make sure to rename 
the upstream tarball to ptouch-driver_0.13.orig.tar.gz when using the 
new .diff.gz.


   Till


ptouch-driver_0.13-1.diff.gz
Description: Unix tar archive


Bug#555892: RFP: ptouch-driver -- CUPS/Foomatic driver for Brother P-touch, label printers

2009-11-12 Thread Till Kamppeter

Sorry, I had the wrong tarball. Upstream version 1.3 was correct.

Attached is the fixed .diff.gz for upstreamversion 1.3 with the correct 
margin definition.


   Till


ptouch-driver_1.3-1.diff.gz
Description: Unix tar archive