Commit 47a846a7e0bad4d1176c2c372618576987d4ce24

Authored by Tobias Hoffmann
Committed by Jay Berkenbilt
1 parent 3b413ca8

Added method to clear pages cache.

include/qpdf/QPDF.hh
... ... @@ -344,6 +344,9 @@ class QPDF
344 344 QPDF_DLL
345 345 std::vector<QPDFObjectHandle> const& getAllPages();
346 346  
  347 + QPDF_DLL
  348 + void clearPagesCache();
  349 +
347 350 // Resolver class is restricted to QPDFObjectHandle so that only
348 351 // it can resolve indirect references.
349 352 class Resolver
... ...
libqpdf/QPDF.cc
... ... @@ -2202,3 +2202,9 @@ QPDF::getAllPagesInternal(QPDFObjectHandle cur_pages,
2202 2202 ": invalid Type in page tree");
2203 2203 }
2204 2204 }
  2205 +
  2206 +void
  2207 +QPDF::clearPagesCache()
  2208 +{
  2209 + this->all_pages.clear();
  2210 +}
... ...