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

Bug#769618: unblock: qpdf/5.1.2-2



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package qpdf

Version 5.1.2-2 fixes bug #769599, originally reported as
https://bugs.launchpad.net/ubuntu/+source/qpdf/+bug/1392048.

One-sentence summary: this one-line code change fixes a bug that makes
it impossible to print certain PDF files that contain blank pages.

Detailed description: a PDF file may contain a page that lacks a
/Contents key in its page dictionary. This is one way to represent a
blank page in a PDF file. (The other, more common way is to include
/Contents but have it be empty.) The /usr/lib/cups/filter/pdftopdf
program, which is part of cups-filters, uses the qpdf library in this
way, so without this fix, it is not possible to print PDF files that
contain blank pages implemented in this way. The fix to this bug is one
line of code, and I have already committed the fix upstream. (I am
upstream for qpdf.) The patch attached here includes only the code
change, but the original commit also includes updates to the extensive
test suite.

Changelog entry:

----------
qpdf (5.1.2-2) unstable; urgency=medium

  * Properly handle pages with no /Content in the page dictionary,
    enabling printing of files with blank pages as produced by some
    software. (Closes: #769599)

 -- Jay Berkenbilt <qjb@debian.org>  Fri, 14 Nov 2014 21:07:25 -0500
----------

unblock qpdf/5.1.2-2

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru qpdf-5.1.2/debian/changelog qpdf-5.1.2/debian/changelog
--- qpdf-5.1.2/debian/changelog	2014-06-07 17:14:59.000000000 -0400
+++ qpdf-5.1.2/debian/changelog	2014-11-14 21:22:24.000000000 -0500
@@ -1,3 +1,11 @@
+qpdf (5.1.2-2) unstable; urgency=medium
+
+  * Properly handle pages with no /Content in the page dictionary,
+    enabling printing of files with blank pages as produced by some
+    software. (Closes: #769599)
+
+ -- Jay Berkenbilt <qjb@debian.org>  Fri, 14 Nov 2014 21:07:25 -0500
+
 qpdf (5.1.2-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru qpdf-5.1.2/debian/patches/page-no-content.patch qpdf-5.1.2/debian/patches/page-no-content.patch
--- qpdf-5.1.2/debian/patches/page-no-content.patch	1969-12-31 19:00:00.000000000 -0500
+++ qpdf-5.1.2/debian/patches/page-no-content.patch	2014-11-14 21:22:24.000000000 -0500
@@ -0,0 +1,44 @@
+Description: properly handle page with no /Content
+Origin: upstream, https://github.com/qpdf/qpdf/commit/caab1b0e1642bc6ee0194c7ab4c4a4de2ab22f2c
+Bug-Debian: http://bugs.debian.org/769599
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/qpdf/+bug/1392048
+
+commit caab1b0e1642bc6ee0194c7ab4c4a4de2ab22f2c
+Author: Jay Berkenbilt <ejb@ql.org>
+Date:   Fri Nov 14 13:43:34 2014 -0500
+
+    Handle pages with no /Contents from getPageContents()
+    
+    The spec allows /Contents to be omitted for pages that are blank, but
+    QPDFObjectHandle::getPageContents() was throwing an exception in this
+    case.
+
+Index: qpdf/ChangeLog
+===================================================================
+--- qpdf.orig/ChangeLog
++++ qpdf/ChangeLog
+@@ -1,3 +1,11 @@
++2014-11-14  Jay Berkenbilt  <ejb@ql.org>
++
++	* Bug fix: QPDFObjectHandle::getPageContents() no longer throws an
++	exception when called on a page that has no /Contents key in its
++	dictionary. This is allowed by the spec, and some software
++	packages generate files like this for pages that are blank in the
++	original.
++
+ 2014-06-07  Jay Berkenbilt  <ejb@ql.org>
+ 
+ 	* 5.1.2: release
+Index: qpdf/libqpdf/QPDFObjectHandle.cc
+===================================================================
+--- qpdf.orig/libqpdf/QPDFObjectHandle.cc
++++ qpdf/libqpdf/QPDFObjectHandle.cc
+@@ -633,7 +633,7 @@ QPDFObjectHandle::getPageContents()
+     {
+ 	result.push_back(contents);
+     }
+-    else
++    else if (! contents.isNull())
+     {
+ 	throw std::runtime_error("unknown object type inspecting /Contents "
+ 				 "key in page dictionary");
diff -Nru qpdf-5.1.2/debian/patches/series qpdf-5.1.2/debian/patches/series
--- qpdf-5.1.2/debian/patches/series	2014-06-07 17:14:59.000000000 -0400
+++ qpdf-5.1.2/debian/patches/series	2014-11-14 21:22:24.000000000 -0500
@@ -0,0 +1 @@
+page-no-content.patch

Reply to: