Commit 47a846a7e0bad4d1176c2c372618576987d4ce24
Committed by
Jay Berkenbilt
1 parent
3b413ca8
Added method to clear pages cache.
Showing
2 changed files
with
9 additions
and
0 deletions
include/qpdf/QPDF.hh
| @@ -344,6 +344,9 @@ class QPDF | @@ -344,6 +344,9 @@ class QPDF | ||
| 344 | QPDF_DLL | 344 | QPDF_DLL |
| 345 | std::vector<QPDFObjectHandle> const& getAllPages(); | 345 | std::vector<QPDFObjectHandle> const& getAllPages(); |
| 346 | 346 | ||
| 347 | + QPDF_DLL | ||
| 348 | + void clearPagesCache(); | ||
| 349 | + | ||
| 347 | // Resolver class is restricted to QPDFObjectHandle so that only | 350 | // Resolver class is restricted to QPDFObjectHandle so that only |
| 348 | // it can resolve indirect references. | 351 | // it can resolve indirect references. |
| 349 | class Resolver | 352 | class Resolver |
libqpdf/QPDF.cc
| @@ -2202,3 +2202,9 @@ QPDF::getAllPagesInternal(QPDFObjectHandle cur_pages, | @@ -2202,3 +2202,9 @@ QPDF::getAllPagesInternal(QPDFObjectHandle cur_pages, | ||
| 2202 | ": invalid Type in page tree"); | 2202 | ": invalid Type in page tree"); |
| 2203 | } | 2203 | } |
| 2204 | } | 2204 | } |
| 2205 | + | ||
| 2206 | +void | ||
| 2207 | +QPDF::clearPagesCache() | ||
| 2208 | +{ | ||
| 2209 | + this->all_pages.clear(); | ||
| 2210 | +} |