aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFObjectHandle.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/QPDFObjectHandle.cc')
-rw-r--r--libqpdf/QPDFObjectHandle.cc17
1 files changed, 1 insertions, 16 deletions
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc
index 17894560..d5ac137a 100644
--- a/libqpdf/QPDFObjectHandle.cc
+++ b/libqpdf/QPDFObjectHandle.cc
@@ -2299,22 +2299,7 @@ QPDFObjectHandle::isPageObject()
}
// getAllPages repairs /Type when traversing the page tree.
getOwningQPDF()->getAllPages();
- if (!this->isDictionary()) {
- return false;
- }
- if (this->hasKey("/Type")) {
- QPDFObjectHandle type = this->getKey("/Type");
- if (type.isNameAndEquals("/Page")) {
- return true;
- }
- // Files have been seen in the wild that have /Type (Page)
- else if (type.isString() && (type.getStringValue() == "Page")) {
- return true;
- } else {
- return false;
- }
- }
- return false;
+ return isDictionaryOfType("/Page");
}
bool