[pkpgcounter/f18] Correct page count of postscript files (#852410)

Jiří Popelka jpopelka at fedoraproject.org
Sat Sep 1 05:25:31 UTC 2012


commit 7947b50bbfc09748d0ad2bdfb4157fb7c5f2acc4
Author: Jiri Popelka <jpopelka at redhat.com>
Date:   Sat Sep 1 07:17:44 2012 +0200

    Correct page count of postscript files (#852410)

 pkpgcounter-postscript-multiple-copies.patch |   12 ++++++++++++
 pkpgcounter.spec                             |   15 +++++++++++++--
 2 files changed, 25 insertions(+), 2 deletions(-)
---
diff --git a/pkpgcounter-postscript-multiple-copies.patch b/pkpgcounter-postscript-multiple-copies.patch
new file mode 100644
index 0000000..4f93c08
--- /dev/null
+++ b/pkpgcounter-postscript-multiple-copies.patch
@@ -0,0 +1,12 @@
+diff -up pkpgcounter-3.50/pkpgpdls/postscript.py.multiple_copies pkpgcounter-3.50/pkpgpdls/postscript.py
+--- pkpgcounter-3.50/pkpgpdls/postscript.py.multiple_copies	2007-12-09 15:26:22.000000000 +0100
++++ pkpgcounter-3.50/pkpgpdls/postscript.py	2012-09-01 07:05:06.000000000 +0200
+@@ -101,7 +101,7 @@ class Parser(pdlparser.PDLParser) :
+                     notinteger = 1 # It seems that sometimes it's not an integer but an EPS file name
+                 else :    
+                     notinteger = 0
+-                    if newpagenum == oldpagenum :
++                    if newpagenum <= oldpagenum :
+                         proceed = 0
+                     else :
+                         oldpagenum = newpagenum
diff --git a/pkpgcounter.spec b/pkpgcounter.spec
index 072efd5..529a71c 100644
--- a/pkpgcounter.spec
+++ b/pkpgcounter.spec
@@ -1,11 +1,12 @@
 Summary: Computes number of pages or quantity of ink needed to print documents
 Name:    pkpgcounter
 Version: 3.50
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv3+
+Group:   Applications/System
 URL:     http://www.pykota.com/software/pkpgcounter
 Source0: http://www.pykota.com/software/pkpgcounter/download/tarballs/pkpgcounter-%{version}.tar.gz
-Group:   Applications/System
+Patch0:  pkpgcounter-postscript-multiple-copies.patch
 
 BuildArch:     noarch
 BuildRequires: python2-devel
@@ -26,6 +27,12 @@ JASMine, but can of course be used independently.
 %prep
 %setup -q
 
+# This change corrects the page count of postscript files when printed
+# with multiple copies from the MS Office suite. Without this patch, every time
+# that a user try to print a job using multiple copies from MS office it counts
+# much more than the correct quantity of copies.
+%patch0 -p1 -b .multiple_copies
+
 iconv -f iso-8859-1 -t utf-8 -o NEWS.tmp NEWS && mv NEWS.tmp NEWS
 iconv -f iso-8859-1 -t utf-8 -o CREDITS.tmp CREDITS && mv CREDITS.tmp CREDITS
 
@@ -51,6 +58,10 @@ rm -rf %{buildroot}%{_docdir}/pkpgcounter
 %{_mandir}/man1/pkpgcounter.1.gz
 
 %changelog
+* Sat Sep 01 2012 Jiri Popelka <jpopelka at redhat.com> 3.50-3
+- Correct page count of postscript files when printed
+  with multiple copies from the MS Office (#852410)
+
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.50-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list