aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgenerate_auto_job13
-rw-r--r--job.sums4
-rw-r--r--libqpdf/QPDFJob_config.cc4
-rw-r--r--libqpdf/QPDFJob_json.cc33
-rw-r--r--libqpdf/qpdf/auto_job_json_init.hh64
-rw-r--r--qpdf/qpdf.testcov2
-rw-r--r--qpdf/qtest/qpdf/bad-bare-option-false-json.out2
-rw-r--r--qpdf/qtest/qpdf/bad-json-bare-option-false.json2
-rw-r--r--qpdf/qtest/qpdf/job-json-add-attachments.json2
-rw-r--r--qpdf/qtest/qpdf/job-json-choice-match.json2
-rw-r--r--qpdf/qtest/qpdf/job-json-copy-attachments.json2
-rw-r--r--qpdf/qtest/qpdf/job-json-empty-input.json4
-rw-r--r--qpdf/qtest/qpdf/job-json-encrypt-128.json4
-rw-r--r--qpdf/qtest/qpdf/job-json-encrypt-256-with-restrictions.json4
-rw-r--r--qpdf/qtest/qpdf/job-json-encrypt-40.json4
-rw-r--r--qpdf/qtest/qpdf/job-json-input-file-password.json4
-rw-r--r--qpdf/qtest/qpdf/job-json-misc-options.json4
-rw-r--r--qpdf/qtest/qpdf/job-json-replace-input.json4
-rw-r--r--qpdf/qtest/qpdf/job-json-underlay-overlay-password.json2
-rw-r--r--qpdf/qtest/qpdf/job-json-underlay-overlay.json4
-rw-r--r--qpdf/qtest/qpdf/job-show-encryption.json2
21 files changed, 89 insertions, 77 deletions
diff --git a/generate_auto_job b/generate_auto_job
index 5993a48e..68fa269d 100755
--- a/generate_auto_job
+++ b/generate_auto_job
@@ -465,14 +465,19 @@ class Main:
self.json_init.append(
f'addBare([this]() {{ {config}->{flag_key}(); }});')
elif kind == 'optional_parameter' or kind == 'required_parameter':
- # No optional parameters in json
+ # Optional parameters end up just being the empty string,
+ # so the handler has to deal with it. The empty string is
+ # also allowed for non-optional.
self.json_init.append(
f'addParameter([this](char const* p)'
f' {{ {config}->{flag_key}(p); }});')
- elif kind == 'optional_choices' or kind == 'required_choices':
- # No optional choices in json
+ elif kind == 'optional_choices':
+ self.json_init.append(
+ f'addChoices({v}_choices, false,'
+ f' [this](char const* p) {{ {config}->{flag_key}(p); }});')
+ elif kind == 'required_choices':
self.json_init.append(
- f'addChoices({v}_choices,'
+ f'addChoices({v}_choices, true,'
f' [this](char const* p) {{ {config}->{flag_key}(p); }});')
def handle_json_manual(self, path):
diff --git a/job.sums b/job.sums
index bc5be54c..6081e9dd 100644
--- a/job.sums
+++ b/job.sums
@@ -1,5 +1,5 @@
# Generated by generate_auto_job
-generate_auto_job 905fed38c06d258af617ac909bed78a7888a5eaba3f14cf143168665f6e90a86
+generate_auto_job 8b3cc47eb96bfd003954d16d51c482e0e015544fdcdc1cbc89b6dcd964f8a2cb
include/qpdf/auto_job_c_att.hh 7ad43bb374c1370ef32ebdcdcb7b73a61d281f7f4e3f12755585872ab30fb60e
include/qpdf/auto_job_c_copy_att.hh 32275d03cdc69b703dd7e02ba0bbe15756e714e9ad185484773a6178dc09e1ee
include/qpdf/auto_job_c_enc.hh 72e138c7b96ed5aacdce78c1dec04b1c20d361faec4f8faf52f64c1d6be99265
@@ -11,7 +11,7 @@ libqpdf/qpdf/auto_job_decl.hh 9f79396ec459f191be4c5fe34cf88c265cf47355a1a945fa39
libqpdf/qpdf/auto_job_help.hh a0ab6ab4dde2ad3d3f17ecae3ea274919119329e075061f3a3973535f5e367de
libqpdf/qpdf/auto_job_init.hh c244e03e8b83ed7db732920f40aff0134e5f2e78a6edb9473ea4dd1934a8953e
libqpdf/qpdf/auto_job_json_decl.hh c5e3fd38a3b0c569eb0c6b4c60953a09cd6bc7d3361a357a81f64fe36af2b0cf
-libqpdf/qpdf/auto_job_json_init.hh bfaf88ad1461e1157e7a0eb6e8c90669eba6d03b5b1ffd2e7e7041250c5f0523
+libqpdf/qpdf/auto_job_json_init.hh 3f86ce40931ca8f417d050fcd49104d73c1fa4e977ad19d54b372831a8ea17ed
libqpdf/qpdf/auto_job_schema.hh 2ec70dffdd15974d74102b4d7ada9f97449bc28c98be119efee5e15507ed22a8
manual/_ext/qpdf.py e9ac9d6c70642a3d29281ee5ad92ae2422dee8be9306fb8a0bc9dba0ed5e28f3
manual/cli.rst a75a7e34aa9aba4f06e9c88cae9a2d9a2aa4e55a08521dde1478e8f2d80aadab
diff --git a/libqpdf/QPDFJob_config.cc b/libqpdf/QPDFJob_config.cc
index 2066e608..ed8943f6 100644
--- a/libqpdf/QPDFJob_config.cc
+++ b/libqpdf/QPDFJob_config.cc
@@ -108,7 +108,7 @@ QPDFJob::Config::coalesceContents()
QPDFJob::Config*
QPDFJob::Config::collate(char const* parameter)
{
- auto n = ((parameter == 0) ? 1 :
+ auto n = (((parameter == 0) || (strlen(parameter) == 0)) ? 1 :
QUtil::string_to_uint(parameter));
o.m->collate = QIntC::to_size(n);
return this;
@@ -519,7 +519,7 @@ QPDFJob::Config::showXref()
QPDFJob::Config*
QPDFJob::Config::splitPages(char const* parameter)
{
- int n = ((parameter == 0) ? 1 :
+ int n = (((parameter == 0) || (strlen(parameter) == 0)) ? 1 :
QUtil::string_to_int(parameter));
o.m->split_pages = n;
return this;
diff --git a/libqpdf/QPDFJob_json.cc b/libqpdf/QPDFJob_json.cc
index 3091c7b1..cc4e2ff7 100644
--- a/libqpdf/QPDFJob_json.cc
+++ b/libqpdf/QPDFJob_json.cc
@@ -31,7 +31,7 @@ namespace
void addBare(bare_handler_t);
void addParameter(param_handler_t);
- void addChoices(char const** choices, param_handler_t);
+ void addChoices(char const** choices, bool required, param_handler_t);
void pushKey(std::string const& key);
void beginDict(json_handler_t start_fn,
bare_handler_t end_fn);
@@ -106,11 +106,12 @@ Handlers::initHandlers()
void
Handlers::addBare(bare_handler_t fn)
{
- jh->addBoolHandler([this, fn](std::string const& path, bool v){
- if (! v)
+ jh->addStringHandler(
+ [this, fn](std::string const& path, std::string const& parameter){
+ if (! parameter.empty())
{
- QTC::TC("qpdf", "QPDFJob json bare not true");
- usage(path + ": value must be true");
+ QTC::TC("qpdf", "QPDFJob json bare not empty");
+ usage(path + ": value must be the empty string");
}
else
{
@@ -129,22 +130,28 @@ Handlers::addParameter(param_handler_t fn)
}
void
-Handlers::addChoices(char const** choices,
- param_handler_t fn)
+Handlers::addChoices(char const** choices, bool required, param_handler_t fn)
{
jh->addStringHandler(
- [fn, choices, this](
+ [fn, choices, required, this](
std::string const& path, std::string const& parameter){
char const* p = parameter.c_str();
bool matches = false;
- for (char const** i = choices; *i; ++i)
+ if ((! required) && (parameter.empty()))
+ {
+ matches = true;
+ }
+ if (! matches)
{
- if (strcmp(*i, p) == 0)
+ for (char const** i = choices; *i; ++i)
{
- QTC::TC("qpdf", "QPDFJob json choice match");
- matches = true;
- break;
+ if (strcmp(*i, p) == 0)
+ {
+ QTC::TC("qpdf", "QPDFJob json choice match");
+ matches = true;
+ break;
+ }
}
}
if (! matches)
diff --git a/libqpdf/qpdf/auto_job_json_init.hh b/libqpdf/qpdf/auto_job_json_init.hh
index 3d19c76e..833d5471 100644
--- a/libqpdf/qpdf/auto_job_json_init.hh
+++ b/libqpdf/qpdf/auto_job_json_init.hh
@@ -43,19 +43,19 @@ pushKey("newlineBeforeEndstream");
addBare([this]() { c_main->newlineBeforeEndstream(); });
popHandler(); // key: newlineBeforeEndstream
pushKey("normalizeContent");
-addChoices(yn_choices, [this](char const* p) { c_main->normalizeContent(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_main->normalizeContent(p); });
popHandler(); // key: normalizeContent
pushKey("streamData");
-addChoices(stream_data_choices, [this](char const* p) { c_main->streamData(p); });
+addChoices(stream_data_choices, true, [this](char const* p) { c_main->streamData(p); });
popHandler(); // key: streamData
pushKey("compressStreams");
-addChoices(yn_choices, [this](char const* p) { c_main->compressStreams(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_main->compressStreams(p); });
popHandler(); // key: compressStreams
pushKey("recompressFlate");
addBare([this]() { c_main->recompressFlate(); });
popHandler(); // key: recompressFlate
pushKey("decodeLevel");
-addChoices(decode_level_choices, [this](char const* p) { c_main->decodeLevel(p); });
+addChoices(decode_level_choices, true, [this](char const* p) { c_main->decodeLevel(p); });
popHandler(); // key: decodeLevel
pushKey("decrypt");
addBare([this]() { c_main->decrypt(); });
@@ -85,7 +85,7 @@ pushKey("linearizePass1");
addParameter([this](char const* p) { c_main->linearizePass1(p); });
popHandler(); // key: linearizePass1
pushKey("objectStreams");
-addChoices(object_streams_choices, [this](char const* p) { c_main->objectStreams(p); });
+addChoices(object_streams_choices, true, [this](char const* p) { c_main->objectStreams(p); });
popHandler(); // key: objectStreams
pushKey("minVersion");
addParameter([this](char const* p) { c_main->minVersion(p); });
@@ -110,82 +110,82 @@ popHandler(); // key: ownerPassword
pushKey("40bit");
beginDict(bindJSON(&Handlers::beginEncrypt40bit), bindBare(&Handlers::endEncrypt40bit)); // .encrypt.40bit
pushKey("annotate");
-addChoices(yn_choices, [this](char const* p) { c_enc->annotate(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_enc->annotate(p); });
popHandler(); // key: annotate
pushKey("extract");
-addChoices(yn_choices, [this](char const* p) { c_enc->extract(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_enc->extract(p); });
popHandler(); // key: extract
pushKey("modify");
-addChoices(modify128_choices, [this](char const* p) { c_enc->modify(p); });
+addChoices(modify128_choices, true, [this](char const* p) { c_enc->modify(p); });
popHandler(); // key: modify
pushKey("print");
-addChoices(print128_choices, [this](char const* p) { c_enc->print(p); });
+addChoices(print128_choices, true, [this](char const* p) { c_enc->print(p); });
popHandler(); // key: print
popHandler(); // key: 40bit
pushKey("128bit");
beginDict(bindJSON(&Handlers::beginEncrypt128bit), bindBare(&Handlers::endEncrypt128bit)); // .encrypt.128bit
pushKey("accessibility");
-addChoices(yn_choices, [this](char const* p) { c_enc->accessibility(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_enc->accessibility(p); });
popHandler(); // key: accessibility
pushKey("annotate");
-addChoices(yn_choices, [this](char const* p) { c_enc->annotate(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_enc->annotate(p); });
popHandler(); // key: annotate
pushKey("assemble");
-addChoices(yn_choices, [this](char const* p) { c_enc->assemble(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_enc->assemble(p); });
popHandler(); // key: assemble
pushKey("cleartextMetadata");
addBare([this]() { c_enc->cleartextMetadata(); });
popHandler(); // key: cleartextMetadata
pushKey("extract");
-addChoices(yn_choices, [this](char const* p) { c_enc->extract(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_enc->extract(p); });
popHandler(); // key: extract
pushKey("form");
-addChoices(yn_choices, [this](char const* p) { c_enc->form(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_enc->form(p); });
popHandler(); // key: form
pushKey("modifyOther");
-addChoices(yn_choices, [this](char const* p) { c_enc->modifyOther(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_enc->modifyOther(p); });
popHandler(); // key: modifyOther
pushKey("modify");
-addChoices(modify128_choices, [this](char const* p) { c_enc->modify(p); });
+addChoices(modify128_choices, true, [this](char const* p) { c_enc->modify(p); });
popHandler(); // key: modify
pushKey("print");
-addChoices(print128_choices, [this](char const* p) { c_enc->print(p); });
+addChoices(print128_choices, true, [this](char const* p) { c_enc->print(p); });
popHandler(); // key: print
pushKey("forceV4");
addBare([this]() { c_enc->forceV4(); });
popHandler(); // key: forceV4
pushKey("useAes");
-addChoices(yn_choices, [this](char const* p) { c_enc->useAes(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_enc->useAes(p); });
popHandler(); // key: useAes
popHandler(); // key: 128bit
pushKey("256bit");
beginDict(bindJSON(&Handlers::beginEncrypt256bit), bindBare(&Handlers::endEncrypt256bit)); // .encrypt.256bit
pushKey("accessibility");
-addChoices(yn_choices, [this](char const* p) { c_enc->accessibility(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_enc->accessibility(p); });
popHandler(); // key: accessibility
pushKey("annotate");
-addChoices(yn_choices, [this](char const* p) { c_enc->annotate(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_enc->annotate(p); });
popHandler(); // key: annotate
pushKey("assemble");
-addChoices(yn_choices, [this](char const* p) { c_enc->assemble(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_enc->assemble(p); });
popHandler(); // key: assemble
pushKey("cleartextMetadata");
addBare([this]() { c_enc->cleartextMetadata(); });
popHandler(); // key: cleartextMetadata
pushKey("extract");
-addChoices(yn_choices, [this](char const* p) { c_enc->extract(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_enc->extract(p); });
popHandler(); // key: extract
pushKey("form");
-addChoices(yn_choices, [this](char const* p) { c_enc->form(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_enc->form(p); });
popHandler(); // key: form
pushKey("modifyOther");
-addChoices(yn_choices, [this](char const* p) { c_enc->modifyOther(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_enc->modifyOther(p); });
popHandler(); // key: modifyOther
pushKey("modify");
-addChoices(modify128_choices, [this](char const* p) { c_enc->modify(p); });
+addChoices(modify128_choices, true, [this](char const* p) { c_enc->modify(p); });
popHandler(); // key: modify
pushKey("print");
-addChoices(print128_choices, [this](char const* p) { c_enc->print(p); });
+addChoices(print128_choices, true, [this](char const* p) { c_enc->print(p); });
popHandler(); // key: print
pushKey("allowInsecure");
addBare([this]() { c_enc->allowInsecure(); });
@@ -238,11 +238,11 @@ pushKey("showAttachment");
addParameter([this](char const* p) { c_main->showAttachment(p); });
popHandler(); // key: showAttachment
pushKey("json");
-addChoices(json_version_choices, [this](char const* p) { c_main->json(p); });
+addChoices(json_version_choices, false, [this](char const* p) { c_main->json(p); });
popHandler(); // key: json
pushKey("jsonKey");
beginArray(bindJSON(&Handlers::beginJsonKeyArray), bindBare(&Handlers::endJsonKeyArray)); // .jsonKey[]
-addChoices(json_key_choices, [this](char const* p) { c_main->jsonKey(p); });
+addChoices(json_key_choices, true, [this](char const* p) { c_main->jsonKey(p); });
popHandler(); // array: .jsonKey[]
popHandler(); // key: jsonKey
pushKey("jsonObject");
@@ -254,7 +254,7 @@ pushKey("allowWeakCrypto");
addBare([this]() { c_main->allowWeakCrypto(); });
popHandler(); // key: allowWeakCrypto
pushKey("keepFilesOpen");
-addChoices(yn_choices, [this](char const* p) { c_main->keepFilesOpen(p); });
+addChoices(yn_choices, true, [this](char const* p) { c_main->keepFilesOpen(p); });
popHandler(); // key: keepFilesOpen
pushKey("keepFilesOpenThreshold");
addParameter([this](char const* p) { c_main->keepFilesOpenThreshold(p); });
@@ -272,7 +272,7 @@ pushKey("passwordIsHexKey");
addBare([this]() { c_main->passwordIsHexKey(); });
popHandler(); // key: passwordIsHexKey
pushKey("passwordMode");
-addChoices(password_mode_choices, [this](char const* p) { c_main->passwordMode(p); });
+addChoices(password_mode_choices, true, [this](char const* p) { c_main->passwordMode(p); });
popHandler(); // key: passwordMode
pushKey("suppressPasswordRecovery");
addBare([this]() { c_main->suppressPasswordRecovery(); });
@@ -293,7 +293,7 @@ pushKey("iiMinBytes");
addParameter([this](char const* p) { c_main->iiMinBytes(p); });
popHandler(); // key: iiMinBytes
pushKey("removeUnreferencedResources");
-addChoices(remove_unref_choices, [this](char const* p) { c_main->removeUnreferencedResources(p); });
+addChoices(remove_unref_choices, true, [this](char const* p) { c_main->removeUnreferencedResources(p); });
popHandler(); // key: removeUnreferencedResources
pushKey("addAttachment");
beginArray(bindJSON(&Handlers::beginAddAttachmentArray), bindBare(&Handlers::endAddAttachmentArray)); // .addAttachment[]
@@ -345,7 +345,7 @@ pushKey("collate");
addParameter([this](char const* p) { c_main->collate(p); });
popHandler(); // key: collate
pushKey("flattenAnnotations");
-addChoices(flatten_choices, [this](char const* p) { c_main->flattenAnnotations(p); });
+addChoices(flatten_choices, true, [this](char const* p) { c_main->flattenAnnotations(p); });
popHandler(); // key: flattenAnnotations
pushKey("flattenRotation");
addBare([this]() { c_main->flattenRotation(); });
diff --git a/qpdf/qpdf.testcov b/qpdf/qpdf.testcov
index 6648815a..6d33d628 100644
--- a/qpdf/qpdf.testcov
+++ b/qpdf/qpdf.testcov
@@ -630,7 +630,7 @@ qpdf check password password correct 0
qpdf check password not encrypted 0
QPDFJob_config password file 0
QPDFJob_config password stdin 0
-QPDFJob json bare not true 0
+QPDFJob json bare not empty 0
QPDFJob json choice mismatch 0
QPDFJob json choice match 0
QPDFJob json encrypt no key length 0
diff --git a/qpdf/qtest/qpdf/bad-bare-option-false-json.out b/qpdf/qtest/qpdf/bad-bare-option-false-json.out
index d6086349..16cd20f8 100644
--- a/qpdf/qtest/qpdf/bad-bare-option-false-json.out
+++ b/qpdf/qtest/qpdf/bad-bare-option-false-json.out
@@ -1,5 +1,5 @@
-qpdf: error with job-json file bad-json-bare-option-false.json: .qdf: value must be true
+qpdf: error with job-json file bad-json-bare-option-false.json: .qdf: value must be the empty string
Run qpdf--job-json-help for information on the file format.
For help:
diff --git a/qpdf/qtest/qpdf/bad-json-bare-option-false.json b/qpdf/qtest/qpdf/bad-json-bare-option-false.json
index 721b3914..6f4d5f22 100644
--- a/qpdf/qtest/qpdf/bad-json-bare-option-false.json
+++ b/qpdf/qtest/qpdf/bad-json-bare-option-false.json
@@ -1,3 +1,3 @@
{
- "qdf": false
+ "qdf": "not-empty"
}
diff --git a/qpdf/qtest/qpdf/job-json-add-attachments.json b/qpdf/qtest/qpdf/job-json-add-attachments.json
index 8a614ab0..57d71cae 100644
--- a/qpdf/qtest/qpdf/job-json-add-attachments.json
+++ b/qpdf/qtest/qpdf/job-json-add-attachments.json
@@ -1,7 +1,7 @@
{
"inputFile": "minimal.pdf",
"outputFile": "a.pdf",
- "staticId": true,
+ "staticId": "",
"addAttachment": [
{
"file": "auto-txt",
diff --git a/qpdf/qtest/qpdf/job-json-choice-match.json b/qpdf/qtest/qpdf/job-json-choice-match.json
index e9f26258..5e4b6452 100644
--- a/qpdf/qtest/qpdf/job-json-choice-match.json
+++ b/qpdf/qtest/qpdf/job-json-choice-match.json
@@ -1,6 +1,6 @@
{
"inputFile": "minimal.pdf",
"outputFile": "a.pdf",
- "deterministicId": true,
+ "deterministicId": "",
"objectStreams": "generate"
}
diff --git a/qpdf/qtest/qpdf/job-json-copy-attachments.json b/qpdf/qtest/qpdf/job-json-copy-attachments.json
index 3a5dd83d..138abaf1 100644
--- a/qpdf/qtest/qpdf/job-json-copy-attachments.json
+++ b/qpdf/qtest/qpdf/job-json-copy-attachments.json
@@ -1,7 +1,7 @@
{
"inputFile": "minimal.pdf",
"outputFile": "a.pdf",
- "staticId": true,
+ "staticId": "",
"copyAttachmentsFrom": [
{
"file": "job-json-add-attachments.pdf"
diff --git a/qpdf/qtest/qpdf/job-json-empty-input.json b/qpdf/qtest/qpdf/job-json-empty-input.json
index 952f23ad..500dd7cd 100644
--- a/qpdf/qtest/qpdf/job-json-empty-input.json
+++ b/qpdf/qtest/qpdf/job-json-empty-input.json
@@ -1,7 +1,7 @@
{
- "empty": true,
+ "empty": "",
"outputFile": "a.pdf",
- "staticId": true,
+ "staticId": "",
"pages": [
{
"file": "minimal.pdf"
diff --git a/qpdf/qtest/qpdf/job-json-encrypt-128.json b/qpdf/qtest/qpdf/job-json-encrypt-128.json
index 35aba91f..7ac8fcbd 100644
--- a/qpdf/qtest/qpdf/job-json-encrypt-128.json
+++ b/qpdf/qtest/qpdf/job-json-encrypt-128.json
@@ -1,8 +1,8 @@
{
"inputFile": "fxo-blue.pdf",
"outputFile": "a.pdf",
- "staticId": true,
- "staticAesIv": true,
+ "staticId": "",
+ "staticAesIv": "",
"encrypt": {
"userPassword": "u",
"ownerPassword": "o",
diff --git a/qpdf/qtest/qpdf/job-json-encrypt-256-with-restrictions.json b/qpdf/qtest/qpdf/job-json-encrypt-256-with-restrictions.json
index 55ace1cf..23de2a38 100644
--- a/qpdf/qtest/qpdf/job-json-encrypt-256-with-restrictions.json
+++ b/qpdf/qtest/qpdf/job-json-encrypt-256-with-restrictions.json
@@ -1,8 +1,8 @@
{
"inputFile": "minimal.pdf",
"outputFile": "a.pdf",
- "staticId": true,
- "staticAesIv": true,
+ "staticId": "",
+ "staticAesIv": "",
"encrypt": {
"userPassword": "u",
"ownerPassword": "o",
diff --git a/qpdf/qtest/qpdf/job-json-encrypt-40.json b/qpdf/qtest/qpdf/job-json-encrypt-40.json
index b5be3b2a..7172eda3 100644
--- a/qpdf/qtest/qpdf/job-json-encrypt-40.json
+++ b/qpdf/qtest/qpdf/job-json-encrypt-40.json
@@ -1,11 +1,11 @@
{
"inputFile": "minimal.pdf",
"outputFile": "a.pdf",
- "staticId": true,
+ "staticId": "",
"encrypt": {
"userPassword": "u",
"ownerPassword": "o",
"40bit": {}
},
- "allowWeakCrypto": true
+ "allowWeakCrypto": ""
}
diff --git a/qpdf/qtest/qpdf/job-json-input-file-password.json b/qpdf/qtest/qpdf/job-json-input-file-password.json
index 36ce7833..3df1f90e 100644
--- a/qpdf/qtest/qpdf/job-json-input-file-password.json
+++ b/qpdf/qtest/qpdf/job-json-input-file-password.json
@@ -2,7 +2,7 @@
"inputFile": "20-pages.pdf",
"password": "user",
"outputFile": "a.pdf",
- "staticId": true,
- "staticAesIv": true,
+ "staticId": "",
+ "staticAesIv": "",
"compressStreams": "n"
}
diff --git a/qpdf/qtest/qpdf/job-json-misc-options.json b/qpdf/qtest/qpdf/job-json-misc-options.json
index 7b41d3df..c5f70d3c 100644
--- a/qpdf/qtest/qpdf/job-json-misc-options.json
+++ b/qpdf/qtest/qpdf/job-json-misc-options.json
@@ -1,7 +1,7 @@
{
"inputFile": "minimal.pdf",
"outputFile": "a.pdf",
- "staticId": true,
- "linearize": true,
+ "staticId": "",
+ "linearize": "",
"compressStreams": "n"
}
diff --git a/qpdf/qtest/qpdf/job-json-replace-input.json b/qpdf/qtest/qpdf/job-json-replace-input.json
index 3b55755b..e0ad03ec 100644
--- a/qpdf/qtest/qpdf/job-json-replace-input.json
+++ b/qpdf/qtest/qpdf/job-json-replace-input.json
@@ -1,6 +1,6 @@
{
"inputFile": "a.pdf",
- "replaceInput": true,
- "staticId": true,
+ "replaceInput": "",
+ "staticId": "",
"objectStreams": "generate"
}
diff --git a/qpdf/qtest/qpdf/job-json-underlay-overlay-password.json b/qpdf/qtest/qpdf/job-json-underlay-overlay-password.json
index 643b7df5..65e93756 100644
--- a/qpdf/qtest/qpdf/job-json-underlay-overlay-password.json
+++ b/qpdf/qtest/qpdf/job-json-underlay-overlay-password.json
@@ -1,7 +1,7 @@
{
"inputFile": "minimal.pdf",
"outputFile": "a.pdf",
- "staticId": true,
+ "staticId": "",
"underlay": {
"file": "20-pages.pdf",
"password": "user",
diff --git a/qpdf/qtest/qpdf/job-json-underlay-overlay.json b/qpdf/qtest/qpdf/job-json-underlay-overlay.json
index 63d1a85d..55ee4652 100644
--- a/qpdf/qtest/qpdf/job-json-underlay-overlay.json
+++ b/qpdf/qtest/qpdf/job-json-underlay-overlay.json
@@ -2,8 +2,8 @@
"inputFile": "20-pages.pdf",
"password": "owner",
"outputFile": "a.pdf",
- "staticId": true,
- "decrypt": true,
+ "staticId": "",
+ "decrypt": "",
"underlay": {
"file": "fxo-green.pdf"
},
diff --git a/qpdf/qtest/qpdf/job-show-encryption.json b/qpdf/qtest/qpdf/job-show-encryption.json
index 08caf42c..56c4d243 100644
--- a/qpdf/qtest/qpdf/job-show-encryption.json
+++ b/qpdf/qtest/qpdf/job-show-encryption.json
@@ -1,3 +1,3 @@
{
- "showEncryption": true
+ "showEncryption": ""
}