From 27a42c16c790edb8d5998c541b7c271665359f61 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 21 May 2022 17:51:34 -0400 Subject: Change default decode level to "none" with --json-output --- libqpdf/QPDFJob_config.cc | 3 +++ libqpdf/qpdf/auto_job_help.hh | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'libqpdf') 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" -- cgit v1.2.3-54-g00ecf