From e4e2e26d990d038b0d35e7466c8a24dbfafab7d2 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Tue, 6 Mar 2018 11:25:09 -0500 Subject: Properly handle pages with no contents (fixes #194) Remove calls to assertPageObject(). All cases in the library that called assertPageObject() work fine if you don't call assertPageObject() because nothing assumes anything that was being checked by that call. Removing the calls enables more files to be successfully processed. --- include/qpdf/QPDFObjectHandle.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index a2f54a73..6f78e9a9 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -830,6 +830,11 @@ class QPDFObjectHandle QPDF_DLL void assertNumber(); + // The isPageObject method checks the /Type key of the object. + // This is not completely reliable as there are some otherwise + // valid files whose /Type is wrong for page objects. qpdf is + // slightly more accepting but may still return false here when + // treating the object as a page would work. Use this sparingly. QPDF_DLL bool isPageObject(); QPDF_DLL -- cgit v1.2.3-54-g00ecf