aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-01-30 20:39:38 +0100
committerJay Berkenbilt <ejb@ql.org>2022-01-31 21:57:45 +0100
commit1355d95d0811942758036e23d64ed6b9fb7c8317 (patch)
tree449fc6664446e21bcea22f7c50aa816c8ef1e432 /include
parentcd30f626fedef7c577766d32e84a65a7f0fbcb7a (diff)
downloadqpdf-1355d95d0811942758036e23d64ed6b9fb7c8317.tar.zst
QPDFJob: partial mode for initializeFromJson
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDFJob.hh14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh
index 5178c4c1..77ef6068 100644
--- a/include/qpdf/QPDFJob.hh
+++ b/include/qpdf/QPDFJob.hh
@@ -73,8 +73,20 @@ class QPDFJob
void initializeFromArgv(int argc, char* argv[],
char const* progname_env = nullptr);
+ // Initialize a QPDFJob from json. Passing partial = true prevents
+ // this method from doing the final checks (calling
+ // checkConfiguration) after processing the json file. This makes
+ // it possible to initialze QPDFJob in stages using multiple json
+ // files or to have a json file that can be processed from the CLI
+ // with --job-json-file and be combined with other arguments. For
+ // example, you might include only encryption parameters, leaving
+ // it up to the rest of the command-line arguments to provide
+ // input and output files. initializeFromJson is called with
+ // partial = true when invoked from the command line. To make sure
+ // that the json file is fully valid on its own, just don't
+ // specify any other command-line flags.
QPDF_DLL
- void initializeFromJson(std::string const& json);
+ void initializeFromJson(std::string const& json, bool partial = false);
// Set name that is used to prefix verbose messages, progress
// messages, and other things that the library writes to output