aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/qpdf/auto_job_init.hh
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-01-31 20:20:06 +0100
committerJay Berkenbilt <ejb@ql.org>2022-01-31 21:57:45 +0100
commite3506253f17137d6d4831b4615d74689446da72c (patch)
tree5357ed44fbbd4be6e41935a8f2d6c43ce2913316 /libqpdf/qpdf/auto_job_init.hh
parentb4fb9b4ec3e70945b07436c1f4a6a222c2d28b9f (diff)
downloadqpdf-e3506253f17137d6d4831b4615d74689446da72c.tar.zst
Add optional version to --json
Diffstat (limited to 'libqpdf/qpdf/auto_job_init.hh')
-rw-r--r--libqpdf/qpdf/auto_job_init.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/libqpdf/qpdf/auto_job_init.hh b/libqpdf/qpdf/auto_job_init.hh
index 79fdc6d3..28c47be4 100644
--- a/libqpdf/qpdf/auto_job_init.hh
+++ b/libqpdf/qpdf/auto_job_init.hh
@@ -17,6 +17,7 @@ static char const* decode_level_choices[] = {"none", "generalized", "specialized
static char const* object_streams_choices[] = {"disable", "preserve", "generate", 0};
static char const* remove_unref_choices[] = {"auto", "yes", "no", 0};
static char const* flatten_choices[] = {"all", "print", "screen", 0};
+static char const* json_version_choices[] = {"1", "latest", 0};
static char const* json_key_choices[] = {"acroform", "attachments", "encrypt", "objectinfo", "objects", "outlines", "pagelabels", "pages", 0};
static char const* print128_choices[] = {"full", "low", "none", 0};
static char const* modify128_choices[] = {"all", "annotate", "form", "assembly", "none", 0};
@@ -45,7 +46,6 @@ this->ap.addBare("flatten-rotation", [this](){c_main->flattenRotation();});
this->ap.addBare("generate-appearances", [this](){c_main->generateAppearances();});
this->ap.addBare("ignore-xref-streams", [this](){c_main->ignoreXrefStreams();});
this->ap.addBare("is-encrypted", [this](){c_main->isEncrypted();});
-this->ap.addBare("json", [this](){c_main->json();});
this->ap.addBare("keep-inline-images", [this](){c_main->keepInlineImages();});
this->ap.addBare("linearize", [this](){c_main->linearize();});
this->ap.addBare("list-attachments", [this](){c_main->listAttachments();});
@@ -110,6 +110,7 @@ this->ap.addChoices("object-streams", [this](char *x){c_main->objectStreams(x);}
this->ap.addChoices("password-mode", [this](char *x){c_main->passwordMode(x);}, true, password_mode_choices);
this->ap.addChoices("remove-unreferenced-resources", [this](char *x){c_main->removeUnreferencedResources(x);}, true, remove_unref_choices);
this->ap.addChoices("stream-data", [this](char *x){c_main->streamData(x);}, true, stream_data_choices);
+this->ap.addChoices("json", [this](char *x){c_main->json(x);}, false, json_version_choices);
this->ap.registerOptionTable("pages", b(&ArgParser::argEndPages));
this->ap.addPositional(p(&ArgParser::argPagesPositional));
this->ap.addRequiredParameter("password", p(&ArgParser::argPagesPassword), "password");