From 0c7c7e4ba485fd39f5b6d41fa2924c607d2eeda0 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 25 Jun 2022 13:55:45 -0400 Subject: Track whether certain page modifying methods have been called We need to know whether pushInheritedAttributesToPage or getAllPages have been called when generating JSON output. When reading the JSON back in, we have to call the same methods so that object numbers will line up properly. --- libqpdf/QPDF_pages.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'libqpdf/QPDF_pages.cc') diff --git a/libqpdf/QPDF_pages.cc b/libqpdf/QPDF_pages.cc index bfd593a2..bd3f80a6 100644 --- a/libqpdf/QPDF_pages.cc +++ b/libqpdf/QPDF_pages.cc @@ -54,6 +54,7 @@ QPDF::getAllPages() // Note that pushInheritedAttributesToPage may also be used to // initialize this->m->all_pages. if (this->m->all_pages.empty()) { + this->m->ever_called_get_all_pages = true; std::set visited; std::set seen; QPDFObjectHandle pages = getRoot().getKey("/Pages"); -- cgit v1.2.3-70-g09d2