aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2018-02-16 02:45:19 +0100
committerJay Berkenbilt <ejb@ql.org>2018-02-19 03:05:47 +0100
commite410b0fe0d8c1da3e0b0e075b54f247b952389ef (patch)
tree49020a0201961e9e6e0da9b4ab7fa2a498529759 /examples
parent1fdd86a04924e4ab9543133b74df3322cffbd358 (diff)
downloadqpdf-e410b0fe0d8c1da3e0b0e075b54f247b952389ef.tar.zst
Simplify TokenFilter interface
Expose Pl_QPDFTokenizer, and have it do more of the work of managing the token filter's pipeline.
Diffstat (limited to 'examples')
-rw-r--r--examples/pdf-count-strings.cc2
-rw-r--r--examples/pdf-filter-tokens.cc6
2 files changed, 0 insertions, 8 deletions
diff --git a/examples/pdf-count-strings.cc b/examples/pdf-count-strings.cc
index 81718298..072f8b5c 100644
--- a/examples/pdf-count-strings.cc
+++ b/examples/pdf-count-strings.cc
@@ -62,8 +62,6 @@ StringCounter::handleEOF()
// can enhance the output if we want.
write("\n% strings found: ");
write(QUtil::int_to_string(this->count));
- // If you override handleEOF, you must always remember to call finish().
- finish();
}
int
diff --git a/examples/pdf-filter-tokens.cc b/examples/pdf-filter-tokens.cc
index 809c160b..ec6fac12 100644
--- a/examples/pdf-filter-tokens.cc
+++ b/examples/pdf-filter-tokens.cc
@@ -184,12 +184,6 @@ ColorToGray::handleEOF()
writeToken(this->all_stack.at(0));
this->all_stack.pop_front();
}
- // Remember to call finish(). If you override handleEOF, it is
- // essential that you call finish() or else you are likely to lose
- // some data in buffers of downstream pipelines that are not
- // flushed out. This is also mentioned in comments in
- // QPDFObjectHandle.hh.
- finish();
}
int main(int argc, char* argv[])