aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2020-12-27 01:45:01 +0100
committerJay Berkenbilt <ejb@ql.org>2020-12-28 18:58:19 +0100
commit12ecd2019a3186d11ebb6083b3813ce722fb2329 (patch)
treecce0595cc82bef7a66c2b8ed6d0e9bf726334500 /include
parent3f9191a34456e79ec6d98bfe46546d9df9abdcba (diff)
downloadqpdf-12ecd2019a3186d11ebb6083b3813ce722fb2329.tar.zst
Add QPDFObjectHandle::setFilterOnWrite
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDFObjectHandle.hh16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh
index 0cd10569..060d21e1 100644
--- a/include/qpdf/QPDFObjectHandle.hh
+++ b/include/qpdf/QPDFObjectHandle.hh
@@ -786,6 +786,22 @@ class QPDFObjectHandle
QPDF_DLL
QPDFObjectHandle getDict();
+ // By default, or if true passed, QPDFWriter will attempt to
+ // filter a stream based on decode level, whether compression is
+ // enabled, and its ability to filter. Passing false will prevent
+ // QPDFWriter from attempting to filter the stream even if it can.
+ // This includes both decoding and compressing. This makes it
+ // possible for you to prevent QPDFWriter from uncompressing and
+ // recompressing a stream that it knows how to operate on for any
+ // application-specific reason, such as that you have already
+ // optimized its filtering. Note that this doesn't affect any
+ // other ways to get the stream's data, such as pipeStreamData or
+ // getStreamData.
+ QPDF_DLL
+ void setFilterOnWrite(bool);
+ QPDF_DLL
+ bool getFilterOnWrite();
+
// If addTokenFilter has been called for this stream, then the
// original data should be considered to be modified. This means we
// should avoid optimizations such as not filtering a stream that