aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-05-21 23:51:34 +0200
committerJay Berkenbilt <ejb@ql.org>2022-05-21 23:51:34 +0200
commit27a42c16c790edb8d5998c541b7c271665359f61 (patch)
treeb6a9e6dac3f6f8a03603c7ae2341da8b2b997a5a /libqpdf
parentb0f1564376ce847a4a6b6aa54d71bbf6f60ef4c9 (diff)
downloadqpdf-27a42c16c790edb8d5998c541b7c271665359f61.tar.zst
Change default decode level to "none" with --json-output
Diffstat (limited to 'libqpdf')
-rw-r--r--libqpdf/QPDFJob_config.cc3
-rw-r--r--libqpdf/qpdf/auto_job_help.hh6
2 files changed, 6 insertions, 3 deletions
diff --git a/libqpdf/QPDFJob_config.cc b/libqpdf/QPDFJob_config.cc
index 6b72103b..5a343f79 100644
--- a/libqpdf/QPDFJob_config.cc
+++ b/libqpdf/QPDFJob_config.cc
@@ -308,6 +308,9 @@ QPDFJob::Config::jsonOutput(std::string const& parameter)
// explicit use of --json-stream-data.
o.m->json_stream_data = qpdf_sj_inline;
}
+ if (!o.m->decode_level_set) {
+ o.m->decode_level = qpdf_dl_none;
+ }
return this;
}
diff --git a/libqpdf/qpdf/auto_job_help.hh b/libqpdf/qpdf/auto_job_help.hh
index e4bab551..a933497f 100644
--- a/libqpdf/qpdf/auto_job_help.hh
+++ b/libqpdf/qpdf/auto_job_help.hh
@@ -188,7 +188,7 @@ ap.addOptionHelp("--decode-level", "transformation", "control which streams to u
When uncompressing streams, control which types of compression
schemes should be uncompressed:
-- none: don't uncompress anything
+- none: don't uncompress anything. This is the default with --json-output.
- generalized: uncompress streams compressed with a
general-purpose compression algorithm. This is the default.
- specialized: in addition to generalized, also uncompress
@@ -836,8 +836,8 @@ ap.addOptionHelp("--json-output", "json", "serialize to JSON", R"(--json-output[
The output file will be qpdf JSON format at the given version.
"version" may be a specific version or "latest" (the default).
-Version 1 is not supported. See also --json-stream-data
-and --json-stream-prefix.
+Version 1 is not supported. See also --json-stream-data,
+--json-stream-prefix, and --decode-level.
)");
ap.addOptionHelp("--json-input", "json", "input file is qpdf JSON", R"(Treat the input file as a JSON file in qpdf JSON format as
written by qpdf --json-output. See the "QPDF JSON Format"