[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#468049: marked as done (cupsys: should pdftops wrapper round up paper dimensions?)



Your message dated Tue, 29 Apr 2008 23:02:51 +0200
with message-id <20080429210251.GC6494@piware.de>
and subject line Re: [Pkg-cups-devel] Bug#468049: cupsys: should pdftops wrapper round up paper dimensions?
has caused the Debian Bug report #468049,
regarding cupsys: should pdftops wrapper round up paper dimensions?
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
468049: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468049
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: cupsys
Version: 1.3.5-2
Severity: minor
File: /usr/lib/cups/filter/pdftops

The filter/pdftops.c generated by
debian/patches/pdftops-cups-1.4.dpatch rounds down when computing the
paper width and height.  

Although I didn't make a test case to show that this operation causes
a problem, it worries me.  To avoid clipping, shouldn't it round up?
If so, here's a diff:

--- pdftops.c.orig	2008-02-26 14:03:40.000000000 -0500
+++ pdftops.c	2008-02-26 14:11:49.000000000 -0500
@@ -23,6 +23,7 @@
  * Include necessary headers...
  */
 
+#include <math.h>
 #include <cups/cups.h>
 #include <cups/string.h>
 #include <cups/i18n.h>
@@ -211,13 +212,13 @@
 
       if (orientation & 1)
       {
-	snprintf(pdfwidth, sizeof(pdfwidth), "%d", (int)(size->length));
-	snprintf(pdfheight, sizeof(pdfheight), "%d", (int)(size->width));
+	snprintf(pdfwidth, sizeof(pdfwidth), "%d", (int) ceil(size->length));
+	snprintf(pdfheight, sizeof(pdfheight), "%d", (int) ceil(size->width));
       }
       else
       {
-	snprintf(pdfwidth, sizeof(pdfwidth), "%d", (int)(size->width));
-		 snprintf(pdfheight, sizeof(pdfheight), "%d", (int)(size->length));
+	snprintf(pdfwidth, sizeof(pdfwidth), "%d", (int) ceil(size->width));
+	snprintf(pdfheight, sizeof(pdfheight), "%d", (int) ceil(size->length));
       }
 
       pdfargv[pdfargc++] = (char *)"-paperw";

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages cupsys depends on:
ii  adduser               3.105              add and remove users and groups
ii  cupsys-common         1.3.5-2            Common UNIX Printing System(tm) - 
ii  debconf [debconf-2.0] 1.5.19             Debian configuration management sy
ii  ghostscript [gs-esp]  8.61.dfsg.1-1      The GPL Ghostscript PostScript/PDF
ii  libavahi-compat-libdn 0.6.22-2           Avahi Apple Bonjour compatibility 
ii  libc6                 2.7-8              GNU C Library: Shared libraries
ii  libcupsimage2         1.3.5-2            Common UNIX Printing System(tm) - 
ii  libcupsys2            1.3.5-2            Common UNIX Printing System(tm) - 
ii  libdbus-1-3           1.1.4-1            simple interprocess messaging syst
ii  libgnutls26           2.2.2-1            the GNU TLS library - runtime libr
ii  libkrb53              1.6.dfsg.3~beta1-3 MIT Kerberos runtime libraries
ii  libldap-2.4-2         2.4.7-5            OpenLDAP libraries
ii  libpam0g              0.99.7.1-5         Pluggable Authentication Modules l
ii  libpaper1             1.1.23             library for handling paper charact
ii  libslp1               1.2.1-7.1          OpenSLP libraries
ii  lsb-base              3.1-24             Linux Standard Base 3.1 init scrip
ii  perl-modules          5.8.8-12           Core Perl modules
ii  poppler-utils [xpdf-u 0.6.4-1            PDF utilitites (based on libpopple
ii  procps                1:3.2.7-6          /proc file system utilities
ii  ssl-cert              1.0.16             simple debconf wrapper for OpenSSL

Versions of packages cupsys recommends:
ii  avahi-utils             0.6.22-2         Avahi browsing, publishing and dis
ii  cupsys-client           1.3.5-2          Common UNIX Printing System(tm) - 
ii  foomatic-filters        3.0.2-20080211-2 OpenPrinting printer support - fil
ii  smbclient               3.0.28-2+b1      a LanManager-like simple client fo

-- debconf information:
  cupsys/raw-print: true
  cupsys/backend: ipp, lpd, parallel, scsi, serial, socket, usb, snmp, dnssd



--- End Message ---
--- Begin Message ---
Version: 1.3.7-2

Hi Sanjoy,

Sanjoy Mahajan [2008-02-26 14:18 -0500]:
> The filter/pdftops.c generated by
> debian/patches/pdftops-cups-1.4.dpatch rounds down when computing the
> paper width and height.  

The current cupsys' pdftops uses floating point numbers, and thus no
rounding down happens any more.

Thank you!

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply to: