Bug#469730: cupsys: [PATCH] for the new pdftops filter - add support for custom pagesize (needed by firefox 3 beta 3)

2008-03-10 Thread Martin Pitt
tag 469730 - patch
tag 469730 moreinfo
thanks

Hi Alban,

Alban Browaeys [2008-03-06 20:08 +0100]:
 Firefox 3 beta 3 use custom pagesize (there is a hack to try to get near
 standard pages in most cases in pre beta 4 but it won't work in all
 cases).
 First thank you for th new pdftops filter that works with poppler-utils.
 
 This patch check if there is a custom pagesize defined before feeding
 ppdPageSize with NULL. (btw the doc does not state what null is supposed
 to do ...).
 
 I believe other application may be affected in fact any that renders pdf
 and use custom pagesize.

Reply from upstream:

- snip --
The patch isn't valid - custom page sizes are already set in the
cupsMarkOptions() call.

Passing NULL for the size name returns the currently marked size - will
add documentation for that.

What options are being passed to the filter?

(a debug error_log file will show the options...)
- snip --

Thanks,

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

My 5 today: #198753 (libxfce4mcs), #198129 (tzdata), #146230 (ps3-kboot),
#153152 (hplip), #177382 (postgresql-8.3)
Do 5 a day - every day! https://wiki.ubuntu.com/5-A-Day


signature.asc
Description: Digital signature


Bug#469730: cupsys: [PATCH] for the new pdftops filter - add support for custom pagesize (needed by firefox 3 beta 3)

2008-03-07 Thread Martin Pitt
forwarded 469730 http://www.cups.org/str.php?L2744
tag 469730 upstream patch
thanks

Alban Browaeys [2008-03-06 20:08 +0100]:
 This patch check if there is a custom pagesize defined before feeding
 ppdPageSize with NULL. (btw the doc does not state what null is supposed
 to do ...).
 
 I believe other application may be affected in fact any that renders pdf
 and use custom pagesize.

I forwarded your patch to upstream and will wait for comments. I'll
apply it to Debian afterwards.

Thanks a lot!

Martin

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



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#469730: cupsys: [PATCH] for the new pdftops filter - add support for custom pagesize (needed by firefox 3 beta 3)

2008-03-06 Thread Alban Browaeys
Package: cupsys
Version: 1.3.6-1
Severity: important
Tags: patch

Firefox 3 beta 3 use custom pagesize (there is a hack to try to get near
standard pages in most cases in pre beta 4 but it won't work in all
cases).
First thank you for th new pdftops filter that works with poppler-utils.

This patch check if there is a custom pagesize defined before feeding
ppdPageSize with NULL. (btw the doc does not state what null is supposed
to do ...).

I believe other application may be affected in fact any that renders pdf
and use custom pagesize.

In the hope that it ll be of use.

Best regards
Alban

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

Kernel: Linux 2.6.25-rc2-git6 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages cupsys depends on:
ii  adduser   3.106  add and remove users and groups
ii  cupsys-common 1.3.6-1Common 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.1The GPL Ghostscript PostScript/PDF
ii  gs-esp8.61.dfsg.1-1.1Transitional package
ii  libavahi-compat-libdn 0.6.22-2   Avahi Apple Bonjour compatibility 
ii  libc6 2.7-9  GNU C Library: Shared libraries
ii  libcupsimage2 1.3.6-1Common UNIX Printing System(tm) - 
ii  libcupsys21.3.6-1Common UNIX Printing System(tm) - 
ii  libdbus-1-3   1.1.20-1   simple interprocess messaging syst
ii  libgnutls26   2.2.2-1the 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-6OpenLDAP 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.2-4  Linux Standard Base 3.2 init scrip
ii  perl-modules  5.8.8-12   Core Perl modules
ii  poppler-utils [xpdf-u 0.6.4-1PDF utilitites (based on libpopple
ii  procps1: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.6-1  Common UNIX Printing System(tm) - 
ii  foomatic-filters3.0.2-20080211-3 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
--- pdftops.c.old	2008-03-06 19:59:25.0 +0100
+++ pdftops.c	2008-03-06 19:53:41.0 +0100
@@ -178,7 +178,10 @@
 * Set output page size...
 */
 
-size = ppdPageSize(ppd, NULL);
+if ((val = cupsGetOption(PageSize, num_options, options)) != NULL)
+  size = ppdPageSize(ppd, val);
+else
+  size = ppdPageSize(ppd, NULL);
 if (size)
 {
  /*