aboutsummaryrefslogtreecommitdiffstats
path: root/include/qpdf/Constants.h
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2017-08-19 15:18:14 +0200
committerJay Berkenbilt <ejb@ql.org>2017-08-21 23:44:22 +0200
commit9744414c66e3f85700ebc8b32d90f45ff97221bd (patch)
tree47abed5c4105fe3f0089ab9afdf1d053d806b39d /include/qpdf/Constants.h
parentae90d2c485318beb8b4b938d09ffaf5c6f0a5e21 (diff)
downloadqpdf-9744414c66e3f85700ebc8b32d90f45ff97221bd.tar.zst
Enable finer grained control of stream decoding
This commit adds several API methods that enable control over which types of filters QPDF will attempt to decode. It also adds support for /RunLengthDecode and /DCTDecode filters for both encoding and decoding.
Diffstat (limited to 'include/qpdf/Constants.h')
-rw-r--r--include/qpdf/Constants.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/qpdf/Constants.h b/include/qpdf/Constants.h
index 38f1e71e..c2763956 100644
--- a/include/qpdf/Constants.h
+++ b/include/qpdf/Constants.h
@@ -26,7 +26,7 @@ enum qpdf_error_code_e
qpdf_e_pages, /* erroneous or unsupported pages structure */
};
-/* Write Parameters */
+/* Write Parameters. See QPDFWriter.hh for details. */
enum qpdf_object_stream_e
{
@@ -41,6 +41,23 @@ enum qpdf_stream_data_e
qpdf_s_compress /* compress stream data */
};
+/* Stream data flags */
+
+/* See pipeStreamData in QPDFObjectHandle.hh for details on these flags. */
+enum qpdf_stream_encode_flags_e
+{
+ qpdf_ef_compress = 1 << 0, /* compress uncompressed streams */
+ qpdf_ef_normalize = 1 << 1, /* normalize content stream */
+};
+enum qpdf_stream_decode_level_e
+{
+ /* These must be in order from less to more decoding. */
+ qpdf_dl_none = 0, /* preserve all stream filters */
+ qpdf_dl_generalized, /* decode general-purpose filters */
+ qpdf_dl_specialized, /* also decode other non-lossy filters */
+ qpdf_dl_all /* also decode loss filters */
+};
+
/* R3 Encryption Parameters */
enum qpdf_r3_print_e