diff options
author | Jay Berkenbilt <ejb@ql.org> | 2020-12-31 19:57:21 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2021-01-02 17:33:36 +0100 |
commit | 6154221edbb0e17e77da7defeeac5fe53121ef57 (patch) | |
tree | ca11739d987b2072fe63673d38bfadfc79fa886b /include | |
parent | 63ea46193d4ce4cbd1dc37becad4645b0e75769b (diff) | |
download | qpdf-6154221edbb0e17e77da7defeeac5fe53121ef57.tar.zst |
QPDFPageObjectHelper: filterPageContents -> filterContents + form XObject
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDFPageObjectHelper.hh | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/include/qpdf/QPDFPageObjectHelper.hh b/include/qpdf/QPDFPageObjectHelper.hh index 5b63a70d..d5ffe78b 100644 --- a/include/qpdf/QPDFPageObjectHelper.hh +++ b/include/qpdf/QPDFPageObjectHelper.hh @@ -140,15 +140,20 @@ class QPDFPageObjectHelper: public QPDFObjectHelper QPDF_DLL void parsePageContents(QPDFObjectHandle::ParserCallbacks* callbacks); - // Pass a page's contents through the given TokenFilter. If a - // pipeline is also provided, it will be the target of the write - // methods from the token filter. If a pipeline is not specified, - // any output generated by the token filter will be discarded. Use - // this interface if you need to pass a page's contents through - // filter for work purposes without having that filter - // automatically applied to the page's contents, as happens with - // addContentTokenFilter. See examples/pdf-count-strings.cc for an - // example. + // Pass a page's or form XObject's contents through the given + // TokenFilter. If a pipeline is also provided, it will be the + // target of the write methods from the token filter. If a + // pipeline is not specified, any output generated by the token + // filter will be discarded. Use this interface if you need to + // pass a page's contents through filter for work purposes without + // having that filter automatically applied to the page's + // contents, as happens with addContentTokenFilter. See + // examples/pdf-count-strings.cc for an example. + QPDF_DLL + void filterContents(QPDFObjectHandle::TokenFilter* filter, + Pipeline* next = 0); + + // Old name -- calls filterContents() QPDF_DLL void filterPageContents(QPDFObjectHandle::TokenFilter* filter, Pipeline* next = 0); @@ -265,9 +270,7 @@ class QPDFPageObjectHelper: public QPDFObjectHelper private: static void removeUnreferencedResourcesHelper( - QPDFObjectHandle oh, std::set<QPDFObjGen>& seen, - std::function<QPDFObjectHandle()> get_resource, - std::function<void(QPDFObjectHandle::TokenFilter*)> filter_content); + QPDFPageObjectHelper ph, std::set<QPDFObjGen>& seen); class Members { |