From caab1b0e1642bc6ee0194c7ab4c4a4de2ab22f2c Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 14 Nov 2014 13:43:34 -0500 Subject: 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. --- libqpdf/QPDFObjectHandle.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libqpdf') diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc index ef92e3ac..eec4fae3 100644 --- a/libqpdf/QPDFObjectHandle.cc +++ b/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"); -- cgit v1.2.3-54-g00ecf