diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-07-31 21:09:48 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-07-31 22:23:17 +0200 |
commit | 13cf35ce2f39780b5ce35fd65be4b0ae44ea989d (patch) | |
tree | 852a75987e75cf59290fc11de6b762b94eb01c49 /libqpdf | |
parent | 5f4224f31a500452a4f97f36ed57351b41ca0114 (diff) | |
download | qpdf-13cf35ce2f39780b5ce35fd65be4b0ae44ea989d.tar.zst |
Use calledgetallpages and pushedinheritedpageresources
Diffstat (limited to 'libqpdf')
-rw-r--r-- | libqpdf/QPDF_json.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libqpdf/QPDF_json.cc b/libqpdf/QPDF_json.cc index f90096f5..213aa209 100644 --- a/libqpdf/QPDF_json.cc +++ b/libqpdf/QPDF_json.cc @@ -473,6 +473,30 @@ QPDF::JSONReactor::dictionaryItem(std::string const& key, JSON const& value) QTC::TC("qpdf", "QPDF_json bad json version"); error(value.getStart(), "invalid JSON version (must be 2)"); } + } else if (key == "pushedinheritedpageresources") { + bool v; + if (value.getBool(v)) { + if ((!this->must_be_complete) && v) { + this->pdf.pushInheritedAttributesToPage(); + } + } else { + QTC::TC("qpdf", "QPDF_json bad pushedinheritedpageresources"); + error( + value.getStart(), + "pushedinheritedpageresources must be a boolean"); + } + } else if (key == "calledgetallpages") { + bool v; + if (value.getBool(v)) { + if ((!this->must_be_complete) && v) { + this->pdf.getAllPages(); + } + } else { + QTC::TC("qpdf", "QPDF_json bad calledgetallpages"); + error( + value.getStart(), + "calledgetallpages must be a boolean"); + } } else { // ignore unknown keys for forward compatibility and to // skip keys we don't care about like "maxobjectid". |