diff options
-rw-r--r-- | include/qpdf/QPDF.hh | 3 | ||||
-rw-r--r-- | libqpdf/QPDF.cc | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index a4a06c8f..048bad47 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -344,6 +344,9 @@ class QPDF QPDF_DLL std::vector<QPDFObjectHandle> const& getAllPages(); + QPDF_DLL + void clearPagesCache(); + // Resolver class is restricted to QPDFObjectHandle so that only // it can resolve indirect references. class Resolver diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc index 1c47d893..64c454a2 100644 --- a/libqpdf/QPDF.cc +++ b/libqpdf/QPDF.cc @@ -2202,3 +2202,9 @@ QPDF::getAllPagesInternal(QPDFObjectHandle cur_pages, ": invalid Type in page tree"); } } + +void +QPDF::clearPagesCache() +{ + this->all_pages.clear(); +} |