From 47a846a7e0bad4d1176c2c372618576987d4ce24 Mon Sep 17 00:00:00 2001 From: Tobias Hoffmann Date: Mon, 18 Jun 2012 22:46:19 +0200 Subject: Added method to clear pages cache. --- include/qpdf/QPDF.hh | 3 +++ libqpdf/QPDF.cc | 6 ++++++ 2 files changed, 9 insertions(+) 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 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(); +} -- cgit v1.2.3-54-g00ecf