Bug#679117: printer-driver-ptouch: Incorrect Margins for PT9500PC and PT9800PCN

2012-06-26 Thread Dominik Wild
Package: printer-driver-ptouch
Version: 1.3-3ubuntu0.1
Severity: normal
Tags: upstream patch

Dear Maintainer,

We have a PT9500PC and a PT9800PCN which is compatible to the
PT9500PC (confirmed by Brother). Both printers produce
additional margins at the left and right side of each printed label. These
margins are completely unrelated to the margins set using the CUPS options,
therefore this actually resulted in a label which is slightly larger than
the specified page size. Finally I figured out that setting the margin to
zero using the documented ESC-sequence solved that problem (see the
attached patch).


-- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
  APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500, 
'precise-proposed'), (500, 'precise'), (100, 'precise-backports')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-26-generic-pae (SMP w/4 CPU cores)
Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages printer-driver-ptouch depends on:
ii  ghostscript9.05~dfsg-0ubuntu4
ii  libc6  2.15-0ubuntu10
ii  libcups2   1.5.3-0ubuntu1
ii  libcupsimage2  1.5.3-0ubuntu1
ii  python 2.7.3-0ubuntu2
ii  xz-utils   5.1.1alpha+20110809-3

printer-driver-ptouch recommends no packages.

printer-driver-ptouch suggests no packages.

-- no debconf information
Description: Set margin to zero
 PT9500PC produces an annoying margin left and right of each label.
 Setting the margin to zero using the documented ESC-sequnce fixed
 this behaviour. Attention: Not tested on other printers.
Author: Dominik Wild 
--- ptouch-driver-1.3.orig/rastertoptch.c
+++ ptouch-driver-1.3/rastertoptch.c
@@ -820,7 +820,9 @@ emit_page_cmds (job_options_t* job_optio
 emit_quality_rollfed_size (job_options, new_page_options,
page_size_y, image_height_px);
 
-  /* WHY DON'T WE SET MARGIN (ESC i d ...)? */
+  /* Set zero margin */
+  putchar (ESC); putchar (0x69); putchar (0x64);
+  putchar (0x00); putchar (0x00);
 
   /* Set pixel data transfer compression */
   if (force) {


Bug#679117: printer-driver-ptouch: Incorrect Margins for PT9500PC and PT9800PCN

2012-06-29 Thread Till Kamppeter

Thank you very much for the patch.

In your patch you write "Attention: Not tested on other printers." and 
indeed your patch changes code which affects all supported printers, not 
only the two models with which you were suffering the problem. This can 
easily break things on the other printers, assuming that most supported 
printers work correctly with the original code. If you are not sure that 
the change works for all printers you should do it in a way that it only 
applies if the printer is one of the models for which you have made the 
change.


   Till



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org