mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-02 22:50:20 +00:00
QPDFJob json: flatten json structure
Flatten everything to make it easier to map command-line flags to json. The old structure was an illusion anyway because there was no mechanism to enforce that things were in the right place. This also helps with future flexibility.
This commit is contained in:
parent
47f33cec25
commit
ea96330bb6
@ -562,7 +562,7 @@ class Main:
|
||||
|
||||
def generate_schema(self, data):
|
||||
# Check to make sure that every command-line option is
|
||||
# represented either in data['json'] or data['no-json'].
|
||||
# represented in data['json'].
|
||||
|
||||
# Build a list of options that we expect. If an option appears
|
||||
# once, we just expect to see it once. If it appears in more
|
||||
@ -578,7 +578,7 @@ class Main:
|
||||
else:
|
||||
for t in sorted(tables):
|
||||
expected[f'{t}.{k}'] = {**v}
|
||||
options_seen = set(data['no-json'])
|
||||
options_seen = set()
|
||||
|
||||
# Walk through the json information building the schema as we
|
||||
# go. This verifies consistency between command-line options
|
||||
@ -600,7 +600,7 @@ class Main:
|
||||
|
||||
def validate(self, data):
|
||||
self.check_keys('top', data, set(
|
||||
['choices', 'options', 'no-json', 'json']))
|
||||
['choices', 'options', 'json']))
|
||||
for o in data['options']:
|
||||
self.check_keys('top', o, set(
|
||||
['table', 'prefix', 'config', 'config_prefix',
|
||||
|
10
job.sums
10
job.sums
@ -1,17 +1,17 @@
|
||||
# Generated by generate_auto_job
|
||||
generate_auto_job ef1b438aeebed7ca0afcbe4d1f9c54d3acf899aec8410ebc69cd15ec673dd158
|
||||
generate_auto_job 905fed38c06d258af617ac909bed78a7888a5eaba3f14cf143168665f6e90a86
|
||||
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
|
||||
include/qpdf/auto_job_c_main.hh ff776dd643279330fbf59770d1abf5aaeb13f20bfc5f6a25997aaa72a0907b44
|
||||
include/qpdf/auto_job_c_pages.hh 931840b329a36ca0e41401190e04537b47f2867671a6643bfd8da74014202671
|
||||
include/qpdf/auto_job_c_uo.hh 0585b7de459fa479d9e51a45fa92de0ff6dee748efc9ec1cedd0dde6cee1ad50
|
||||
job.yml c3e714b3c3e2fc85390d983302ff398aa0992c621e85dbcaee20173b1bd3cb0b
|
||||
job.yml 92565dc8023ea880aca5b96c2620f756642a6dafa5ed15546bc2c777c31b218e
|
||||
libqpdf/qpdf/auto_job_decl.hh 9f79396ec459f191be4c5fe34cf88c265cf47355a1a945fa39169d1c94cf04f6
|
||||
libqpdf/qpdf/auto_job_help.hh a0ab6ab4dde2ad3d3f17ecae3ea274919119329e075061f3a3973535f5e367de
|
||||
libqpdf/qpdf/auto_job_init.hh c244e03e8b83ed7db732920f40aff0134e5f2e78a6edb9473ea4dd1934a8953e
|
||||
libqpdf/qpdf/auto_job_json_decl.hh 741a44106f7850b6cbc8af264b5b77bb605475c8d8dd8cd87011d5debbee6269
|
||||
libqpdf/qpdf/auto_job_json_init.hh 63bbe1c3d673cd56196ec42ec7ede7b531563667d83564aa6680634fcb2cf259
|
||||
libqpdf/qpdf/auto_job_schema.hh a764050cc99f1cc95645fd1ea2f020c4b778957abc64fbc55c12eac3a369dc92
|
||||
libqpdf/qpdf/auto_job_json_decl.hh c5e3fd38a3b0c569eb0c6b4c60953a09cd6bc7d3361a357a81f64fe36af2b0cf
|
||||
libqpdf/qpdf/auto_job_json_init.hh bfaf88ad1461e1157e7a0eb6e8c90669eba6d03b5b1ffd2e7e7041250c5f0523
|
||||
libqpdf/qpdf/auto_job_schema.hh 2ec70dffdd15974d74102b4d7ada9f97449bc28c98be119efee5e15507ed22a8
|
||||
manual/_ext/qpdf.py e9ac9d6c70642a3d29281ee5ad92ae2422dee8be9306fb8a0bc9dba0ed5e28f3
|
||||
manual/cli.rst a75a7e34aa9aba4f06e9c88cae9a2d9a2aa4e55a08521dde1478e8f2d80aadab
|
||||
|
29
job.yml
29
job.yml
@ -243,13 +243,6 @@ options:
|
||||
required_parameter:
|
||||
prefix: prefix
|
||||
password: password
|
||||
no-json:
|
||||
- preserve-unreferenced-resources
|
||||
- job-json-file
|
||||
- replace-input
|
||||
- warning-exit-0
|
||||
- requires-password
|
||||
- is-encrypted
|
||||
json:
|
||||
# The structure of this section defines what the json input to
|
||||
# QPDFJob looks like. If a key starts with underscore, it does not
|
||||
@ -262,15 +255,16 @@ json:
|
||||
# converted to camelCase for the schema and must be appear that way
|
||||
# in the user-supplied json. This makes it more convenient to
|
||||
# populate JSON objects in some languages.
|
||||
_input:
|
||||
_file: "input filename"
|
||||
|
||||
# input
|
||||
_inputFile: "input filename"
|
||||
main.password:
|
||||
password-file:
|
||||
empty:
|
||||
_output:
|
||||
_file: "output filename"
|
||||
_replace-input: "set to true to replace input"
|
||||
_options:
|
||||
# output
|
||||
_outputFile: "output filename"
|
||||
replace-input:
|
||||
# output options
|
||||
qdf:
|
||||
preserve-unreferenced:
|
||||
newline-before-endstream:
|
||||
@ -325,7 +319,7 @@ json:
|
||||
Enc256.print:
|
||||
allow-insecure:
|
||||
force-R5:
|
||||
_inspect:
|
||||
# inspect
|
||||
check:
|
||||
check-linearization:
|
||||
filtered-stream-data:
|
||||
@ -345,7 +339,7 @@ json:
|
||||
- null
|
||||
json-object:
|
||||
- null
|
||||
_options:
|
||||
# other options
|
||||
allow-weak-crypto:
|
||||
keep-files-open:
|
||||
keep-files-open-threshold:
|
||||
@ -402,3 +396,8 @@ json:
|
||||
from:
|
||||
repeat:
|
||||
to:
|
||||
warning-exit-0:
|
||||
job-json-file:
|
||||
preserve-unreferenced-resources:
|
||||
requires-password:
|
||||
is-encrypted:
|
||||
|
@ -219,18 +219,6 @@ Handlers::handle(JSON& j)
|
||||
this->json_handlers.back()->handle(".", j);
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginInput(JSON)
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endInput()
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupInputFile()
|
||||
{
|
||||
@ -240,7 +228,7 @@ Handlers::setupInputFile()
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupInputPassword()
|
||||
Handlers::setupPassword()
|
||||
{
|
||||
addParameter([this](char const* p) {
|
||||
c_main->password(p);
|
||||
@ -248,25 +236,13 @@ Handlers::setupInputPassword()
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupInputEmpty()
|
||||
Handlers::setupEmpty()
|
||||
{
|
||||
addBare([this]() {
|
||||
c_main->emptyInput();
|
||||
});
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOutput(JSON)
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endOutput()
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupOutputFile()
|
||||
{
|
||||
@ -276,7 +252,7 @@ Handlers::setupOutputFile()
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupOutputReplaceInput()
|
||||
Handlers::setupReplaceInput()
|
||||
{
|
||||
addBare([this]() {
|
||||
c_main->replaceInput();
|
||||
@ -284,19 +260,7 @@ Handlers::setupOutputReplaceInput()
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOutputOptions(JSON)
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endOutputOptions()
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOutputOptionsEncrypt(JSON j)
|
||||
Handlers::beginEncrypt(JSON j)
|
||||
{
|
||||
// This method is only called if the overall JSON structure
|
||||
// matches the schema, so we already know that keys that are
|
||||
@ -342,137 +306,113 @@ Handlers::beginOutputOptionsEncrypt(JSON j)
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endOutputOptionsEncrypt()
|
||||
Handlers::endEncrypt()
|
||||
{
|
||||
this->c_enc->endEncrypt();
|
||||
this->c_enc = nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupOutputOptionsEncryptUserPassword()
|
||||
Handlers::setupEncryptUserPassword()
|
||||
{
|
||||
// handled in beginOutputOptionsEncrypt
|
||||
// handled in beginEncrypt
|
||||
ignoreItem();
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupOutputOptionsEncryptOwnerPassword()
|
||||
Handlers::setupEncryptOwnerPassword()
|
||||
{
|
||||
// handled in beginOutputOptionsEncrypt
|
||||
// handled in beginEncrypt
|
||||
ignoreItem();
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOutputOptionsEncrypt40bit(JSON)
|
||||
Handlers::beginEncrypt40bit(JSON)
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endOutputOptionsEncrypt40bit()
|
||||
Handlers::endEncrypt40bit()
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOutputOptionsEncrypt128bit(JSON)
|
||||
Handlers::beginEncrypt128bit(JSON)
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endOutputOptionsEncrypt128bit()
|
||||
Handlers::endEncrypt128bit()
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOutputOptionsEncrypt256bit(JSON)
|
||||
Handlers::beginEncrypt256bit(JSON)
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endOutputOptionsEncrypt256bit()
|
||||
Handlers::endEncrypt256bit()
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOptions(JSON)
|
||||
Handlers::beginJsonKeyArray(JSON)
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endOptions()
|
||||
Handlers::endJsonKeyArray()
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginInspect(JSON)
|
||||
Handlers::beginJsonObjectArray(JSON)
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endInspect()
|
||||
Handlers::endJsonObjectArray()
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginInspectJsonKeyArray(JSON)
|
||||
Handlers::beginAddAttachmentArray(JSON)
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endInspectJsonKeyArray()
|
||||
Handlers::endAddAttachmentArray()
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginInspectJsonObjectArray(JSON)
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endInspectJsonObjectArray()
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOptionsAddAttachmentArray(JSON)
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endOptionsAddAttachmentArray()
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOptionsAddAttachment(JSON)
|
||||
Handlers::beginAddAttachment(JSON)
|
||||
{
|
||||
this->c_att = c_main->addAttachment();
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endOptionsAddAttachment()
|
||||
Handlers::endAddAttachment()
|
||||
{
|
||||
this->c_att->endAddAttachment();
|
||||
this->c_att = nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupOptionsAddAttachmentFile()
|
||||
Handlers::setupAddAttachmentFile()
|
||||
{
|
||||
addParameter([this](char const* p) {
|
||||
c_att->file(p);
|
||||
@ -480,32 +420,32 @@ Handlers::setupOptionsAddAttachmentFile()
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOptionsCopyAttachmentsFromArray(JSON)
|
||||
Handlers::beginCopyAttachmentsFromArray(JSON)
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endOptionsCopyAttachmentsFromArray()
|
||||
Handlers::endCopyAttachmentsFromArray()
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOptionsCopyAttachmentsFrom(JSON)
|
||||
Handlers::beginCopyAttachmentsFrom(JSON)
|
||||
{
|
||||
this->c_copy_att = c_main->copyAttachmentsFrom();
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endOptionsCopyAttachmentsFrom()
|
||||
Handlers::endCopyAttachmentsFrom()
|
||||
{
|
||||
this->c_copy_att->endCopyAttachmentsFrom();
|
||||
this->c_copy_att = nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupOptionsCopyAttachmentsFromFile()
|
||||
Handlers::setupCopyAttachmentsFromFile()
|
||||
{
|
||||
addParameter([this](char const* p) {
|
||||
c_copy_att->file(p);
|
||||
@ -513,7 +453,7 @@ Handlers::setupOptionsCopyAttachmentsFromFile()
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupOptionsCopyAttachmentsFromPassword()
|
||||
Handlers::setupCopyAttachmentsFromPassword()
|
||||
{
|
||||
addParameter([this](char const* p) {
|
||||
c_copy_att->password(p);
|
||||
@ -521,20 +461,20 @@ Handlers::setupOptionsCopyAttachmentsFromPassword()
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOptionsPagesArray(JSON)
|
||||
Handlers::beginPagesArray(JSON)
|
||||
{
|
||||
this->c_pages = c_main->pages();
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endOptionsPagesArray()
|
||||
Handlers::endPagesArray()
|
||||
{
|
||||
c_pages->endPages();
|
||||
c_pages = nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOptionsPages(JSON j)
|
||||
Handlers::beginPages(JSON j)
|
||||
{
|
||||
std::string file;
|
||||
std::string range("1-z");
|
||||
@ -565,47 +505,47 @@ Handlers::beginOptionsPages(JSON j)
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endOptionsPages()
|
||||
Handlers::endPages()
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupOptionsPagesFile()
|
||||
Handlers::setupPagesFile()
|
||||
{
|
||||
// handled in beginOptionsPages
|
||||
// handled in beginPages
|
||||
ignoreItem();
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupOptionsPagesPassword()
|
||||
Handlers::setupPagesPassword()
|
||||
{
|
||||
// handled in beginOptionsPages
|
||||
// handled in beginPages
|
||||
ignoreItem();
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupOptionsPagesRange()
|
||||
Handlers::setupPagesRange()
|
||||
{
|
||||
// handled in beginOptionsPages
|
||||
// handled in beginPages
|
||||
ignoreItem();
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOptionsOverlay(JSON)
|
||||
Handlers::beginOverlay(JSON)
|
||||
{
|
||||
this->c_uo = c_main->overlay();
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endOptionsOverlay()
|
||||
Handlers::endOverlay()
|
||||
{
|
||||
c_uo->endUnderlayOverlay();
|
||||
c_uo = nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupOptionsOverlayFile()
|
||||
Handlers::setupOverlayFile()
|
||||
{
|
||||
addParameter([this](char const* p) {
|
||||
c_uo->file(p);
|
||||
@ -613,7 +553,7 @@ Handlers::setupOptionsOverlayFile()
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupOptionsOverlayPassword()
|
||||
Handlers::setupOverlayPassword()
|
||||
{
|
||||
addParameter([this](char const* p) {
|
||||
c_uo->password(p);
|
||||
@ -621,20 +561,20 @@ Handlers::setupOptionsOverlayPassword()
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOptionsUnderlay(JSON)
|
||||
Handlers::beginUnderlay(JSON)
|
||||
{
|
||||
this->c_uo = c_main->underlay();
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endOptionsUnderlay()
|
||||
Handlers::endUnderlay()
|
||||
{
|
||||
c_uo->endUnderlayOverlay();
|
||||
c_uo = nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupOptionsUnderlayFile()
|
||||
Handlers::setupUnderlayFile()
|
||||
{
|
||||
addParameter([this](char const* p) {
|
||||
c_uo->file(p);
|
||||
@ -642,7 +582,7 @@ Handlers::setupOptionsUnderlayFile()
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::setupOptionsUnderlayPassword()
|
||||
Handlers::setupUnderlayPassword()
|
||||
{
|
||||
addParameter([this](char const* p) {
|
||||
c_uo->password(p);
|
||||
|
@ -3,58 +3,48 @@
|
||||
// Edits will be automatically overwritten if the build is
|
||||
// run in maintainer mode.
|
||||
//
|
||||
void beginInput(JSON);
|
||||
void endInput();
|
||||
void setupInputFile();
|
||||
void setupInputPassword();
|
||||
void setupInputEmpty();
|
||||
void beginOutput(JSON);
|
||||
void endOutput();
|
||||
void setupPassword();
|
||||
void setupEmpty();
|
||||
void setupOutputFile();
|
||||
void setupOutputReplaceInput();
|
||||
void beginOutputOptions(JSON);
|
||||
void endOutputOptions();
|
||||
void beginOutputOptionsEncrypt(JSON);
|
||||
void endOutputOptionsEncrypt();
|
||||
void setupOutputOptionsEncryptUserPassword();
|
||||
void setupOutputOptionsEncryptOwnerPassword();
|
||||
void beginOutputOptionsEncrypt40bit(JSON);
|
||||
void endOutputOptionsEncrypt40bit();
|
||||
void beginOutputOptionsEncrypt128bit(JSON);
|
||||
void endOutputOptionsEncrypt128bit();
|
||||
void beginOutputOptionsEncrypt256bit(JSON);
|
||||
void endOutputOptionsEncrypt256bit();
|
||||
void beginInspect(JSON);
|
||||
void endInspect();
|
||||
void beginInspectJsonKeyArray(JSON);
|
||||
void endInspectJsonKeyArray();
|
||||
void beginInspectJsonObjectArray(JSON);
|
||||
void endInspectJsonObjectArray();
|
||||
void beginOptions(JSON);
|
||||
void endOptions();
|
||||
void beginOptionsAddAttachmentArray(JSON);
|
||||
void endOptionsAddAttachmentArray();
|
||||
void beginOptionsAddAttachment(JSON);
|
||||
void endOptionsAddAttachment();
|
||||
void setupOptionsAddAttachmentFile();
|
||||
void beginOptionsCopyAttachmentsFromArray(JSON);
|
||||
void endOptionsCopyAttachmentsFromArray();
|
||||
void beginOptionsCopyAttachmentsFrom(JSON);
|
||||
void endOptionsCopyAttachmentsFrom();
|
||||
void setupOptionsCopyAttachmentsFromFile();
|
||||
void setupOptionsCopyAttachmentsFromPassword();
|
||||
void beginOptionsPagesArray(JSON);
|
||||
void endOptionsPagesArray();
|
||||
void beginOptionsPages(JSON);
|
||||
void endOptionsPages();
|
||||
void setupOptionsPagesFile();
|
||||
void setupOptionsPagesPassword();
|
||||
void setupOptionsPagesRange();
|
||||
void beginOptionsOverlay(JSON);
|
||||
void endOptionsOverlay();
|
||||
void setupOptionsOverlayFile();
|
||||
void setupOptionsOverlayPassword();
|
||||
void beginOptionsUnderlay(JSON);
|
||||
void endOptionsUnderlay();
|
||||
void setupOptionsUnderlayFile();
|
||||
void setupOptionsUnderlayPassword();
|
||||
void setupReplaceInput();
|
||||
void beginEncrypt(JSON);
|
||||
void endEncrypt();
|
||||
void setupEncryptUserPassword();
|
||||
void setupEncryptOwnerPassword();
|
||||
void beginEncrypt40bit(JSON);
|
||||
void endEncrypt40bit();
|
||||
void beginEncrypt128bit(JSON);
|
||||
void endEncrypt128bit();
|
||||
void beginEncrypt256bit(JSON);
|
||||
void endEncrypt256bit();
|
||||
void beginJsonKeyArray(JSON);
|
||||
void endJsonKeyArray();
|
||||
void beginJsonObjectArray(JSON);
|
||||
void endJsonObjectArray();
|
||||
void beginAddAttachmentArray(JSON);
|
||||
void endAddAttachmentArray();
|
||||
void beginAddAttachment(JSON);
|
||||
void endAddAttachment();
|
||||
void setupAddAttachmentFile();
|
||||
void beginCopyAttachmentsFromArray(JSON);
|
||||
void endCopyAttachmentsFromArray();
|
||||
void beginCopyAttachmentsFrom(JSON);
|
||||
void endCopyAttachmentsFrom();
|
||||
void setupCopyAttachmentsFromFile();
|
||||
void setupCopyAttachmentsFromPassword();
|
||||
void beginPagesArray(JSON);
|
||||
void endPagesArray();
|
||||
void beginPages(JSON);
|
||||
void endPages();
|
||||
void setupPagesFile();
|
||||
void setupPagesPassword();
|
||||
void setupPagesRange();
|
||||
void beginOverlay(JSON);
|
||||
void endOverlay();
|
||||
void setupOverlayFile();
|
||||
void setupOverlayPassword();
|
||||
void beginUnderlay(JSON);
|
||||
void endUnderlay();
|
||||
void setupUnderlayFile();
|
||||
void setupUnderlayPassword();
|
||||
|
@ -15,31 +15,24 @@ static char const* json_key_choices[] = {"acroform", "attachments", "encrypt", "
|
||||
static char const* print128_choices[] = {"full", "low", "none", 0};
|
||||
static char const* modify128_choices[] = {"all", "annotate", "form", "assembly", "none", 0};
|
||||
|
||||
pushKey("input");
|
||||
beginDict(bindJSON(&Handlers::beginInput), bindBare(&Handlers::endInput)); // .input
|
||||
pushKey("file");
|
||||
pushKey("inputFile");
|
||||
setupInputFile();
|
||||
popHandler(); // key: file
|
||||
popHandler(); // key: inputFile
|
||||
pushKey("password");
|
||||
setupInputPassword();
|
||||
setupPassword();
|
||||
popHandler(); // key: password
|
||||
pushKey("passwordFile");
|
||||
addParameter([this](char const* p) { c_main->passwordFile(p); });
|
||||
popHandler(); // key: passwordFile
|
||||
pushKey("empty");
|
||||
setupInputEmpty();
|
||||
setupEmpty();
|
||||
popHandler(); // key: empty
|
||||
popHandler(); // key: input
|
||||
pushKey("output");
|
||||
beginDict(bindJSON(&Handlers::beginOutput), bindBare(&Handlers::endOutput)); // .output
|
||||
pushKey("file");
|
||||
pushKey("outputFile");
|
||||
setupOutputFile();
|
||||
popHandler(); // key: file
|
||||
popHandler(); // key: outputFile
|
||||
pushKey("replaceInput");
|
||||
setupOutputReplaceInput();
|
||||
setupReplaceInput();
|
||||
popHandler(); // key: replaceInput
|
||||
pushKey("options");
|
||||
beginDict(bindJSON(&Handlers::beginOutputOptions), bindBare(&Handlers::endOutputOptions)); // .output.options
|
||||
pushKey("qdf");
|
||||
addBare([this]() { c_main->qdf(); });
|
||||
popHandler(); // key: qdf
|
||||
@ -107,15 +100,15 @@ pushKey("splitPages");
|
||||
addParameter([this](char const* p) { c_main->splitPages(p); });
|
||||
popHandler(); // key: splitPages
|
||||
pushKey("encrypt");
|
||||
beginDict(bindJSON(&Handlers::beginOutputOptionsEncrypt), bindBare(&Handlers::endOutputOptionsEncrypt)); // .output.options.encrypt
|
||||
beginDict(bindJSON(&Handlers::beginEncrypt), bindBare(&Handlers::endEncrypt)); // .encrypt
|
||||
pushKey("userPassword");
|
||||
setupOutputOptionsEncryptUserPassword();
|
||||
setupEncryptUserPassword();
|
||||
popHandler(); // key: userPassword
|
||||
pushKey("ownerPassword");
|
||||
setupOutputOptionsEncryptOwnerPassword();
|
||||
setupEncryptOwnerPassword();
|
||||
popHandler(); // key: ownerPassword
|
||||
pushKey("40bit");
|
||||
beginDict(bindJSON(&Handlers::beginOutputOptionsEncrypt40bit), bindBare(&Handlers::endOutputOptionsEncrypt40bit)); // .output.options.encrypt.40bit
|
||||
beginDict(bindJSON(&Handlers::beginEncrypt40bit), bindBare(&Handlers::endEncrypt40bit)); // .encrypt.40bit
|
||||
pushKey("annotate");
|
||||
addChoices(yn_choices, [this](char const* p) { c_enc->annotate(p); });
|
||||
popHandler(); // key: annotate
|
||||
@ -130,7 +123,7 @@ addChoices(print128_choices, [this](char const* p) { c_enc->print(p); });
|
||||
popHandler(); // key: print
|
||||
popHandler(); // key: 40bit
|
||||
pushKey("128bit");
|
||||
beginDict(bindJSON(&Handlers::beginOutputOptionsEncrypt128bit), bindBare(&Handlers::endOutputOptionsEncrypt128bit)); // .output.options.encrypt.128bit
|
||||
beginDict(bindJSON(&Handlers::beginEncrypt128bit), bindBare(&Handlers::endEncrypt128bit)); // .encrypt.128bit
|
||||
pushKey("accessibility");
|
||||
addChoices(yn_choices, [this](char const* p) { c_enc->accessibility(p); });
|
||||
popHandler(); // key: accessibility
|
||||
@ -166,7 +159,7 @@ addChoices(yn_choices, [this](char const* p) { c_enc->useAes(p); });
|
||||
popHandler(); // key: useAes
|
||||
popHandler(); // key: 128bit
|
||||
pushKey("256bit");
|
||||
beginDict(bindJSON(&Handlers::beginOutputOptionsEncrypt256bit), bindBare(&Handlers::endOutputOptionsEncrypt256bit)); // .output.options.encrypt.256bit
|
||||
beginDict(bindJSON(&Handlers::beginEncrypt256bit), bindBare(&Handlers::endEncrypt256bit)); // .encrypt.256bit
|
||||
pushKey("accessibility");
|
||||
addChoices(yn_choices, [this](char const* p) { c_enc->accessibility(p); });
|
||||
popHandler(); // key: accessibility
|
||||
@ -202,10 +195,6 @@ addBare([this]() { c_enc->forceR5(); });
|
||||
popHandler(); // key: forceR5
|
||||
popHandler(); // key: 256bit
|
||||
popHandler(); // key: encrypt
|
||||
popHandler(); // key: options
|
||||
popHandler(); // key: output
|
||||
pushKey("inspect");
|
||||
beginDict(bindJSON(&Handlers::beginInspect), bindBare(&Handlers::endInspect)); // .inspect
|
||||
pushKey("check");
|
||||
addBare([this]() { c_main->check(); });
|
||||
popHandler(); // key: check
|
||||
@ -252,18 +241,15 @@ pushKey("json");
|
||||
addChoices(json_version_choices, [this](char const* p) { c_main->json(p); });
|
||||
popHandler(); // key: json
|
||||
pushKey("jsonKey");
|
||||
beginArray(bindJSON(&Handlers::beginInspectJsonKeyArray), bindBare(&Handlers::endInspectJsonKeyArray)); // .inspect.jsonKey[]
|
||||
beginArray(bindJSON(&Handlers::beginJsonKeyArray), bindBare(&Handlers::endJsonKeyArray)); // .jsonKey[]
|
||||
addChoices(json_key_choices, [this](char const* p) { c_main->jsonKey(p); });
|
||||
popHandler(); // array: .inspect.jsonKey[]
|
||||
popHandler(); // array: .jsonKey[]
|
||||
popHandler(); // key: jsonKey
|
||||
pushKey("jsonObject");
|
||||
beginArray(bindJSON(&Handlers::beginInspectJsonObjectArray), bindBare(&Handlers::endInspectJsonObjectArray)); // .inspect.jsonObject[]
|
||||
beginArray(bindJSON(&Handlers::beginJsonObjectArray), bindBare(&Handlers::endJsonObjectArray)); // .jsonObject[]
|
||||
addParameter([this](char const* p) { c_main->jsonObject(p); });
|
||||
popHandler(); // array: .inspect.jsonObject[]
|
||||
popHandler(); // array: .jsonObject[]
|
||||
popHandler(); // key: jsonObject
|
||||
popHandler(); // key: inspect
|
||||
pushKey("options");
|
||||
beginDict(bindJSON(&Handlers::beginOptions), bindBare(&Handlers::endOptions)); // .options
|
||||
pushKey("allowWeakCrypto");
|
||||
addBare([this]() { c_main->allowWeakCrypto(); });
|
||||
popHandler(); // key: allowWeakCrypto
|
||||
@ -310,10 +296,10 @@ pushKey("removeUnreferencedResources");
|
||||
addChoices(remove_unref_choices, [this](char const* p) { c_main->removeUnreferencedResources(p); });
|
||||
popHandler(); // key: removeUnreferencedResources
|
||||
pushKey("addAttachment");
|
||||
beginArray(bindJSON(&Handlers::beginOptionsAddAttachmentArray), bindBare(&Handlers::endOptionsAddAttachmentArray)); // .options.addAttachment[]
|
||||
beginDict(bindJSON(&Handlers::beginOptionsAddAttachment), bindBare(&Handlers::endOptionsAddAttachment)); // .options.addAttachment
|
||||
beginArray(bindJSON(&Handlers::beginAddAttachmentArray), bindBare(&Handlers::endAddAttachmentArray)); // .addAttachment[]
|
||||
beginDict(bindJSON(&Handlers::beginAddAttachment), bindBare(&Handlers::endAddAttachment)); // .addAttachment
|
||||
pushKey("file");
|
||||
setupOptionsAddAttachmentFile();
|
||||
setupAddAttachmentFile();
|
||||
popHandler(); // key: file
|
||||
pushKey("creationdate");
|
||||
addParameter([this](char const* p) { c_att->creationdate(p); });
|
||||
@ -336,24 +322,24 @@ popHandler(); // key: moddate
|
||||
pushKey("replace");
|
||||
addBare([this]() { c_att->replace(); });
|
||||
popHandler(); // key: replace
|
||||
popHandler(); // array: .options.addAttachment[]
|
||||
popHandler(); // array: .addAttachment[]
|
||||
popHandler(); // key: addAttachment
|
||||
pushKey("removeAttachment");
|
||||
addParameter([this](char const* p) { c_main->removeAttachment(p); });
|
||||
popHandler(); // key: removeAttachment
|
||||
pushKey("copyAttachmentsFrom");
|
||||
beginArray(bindJSON(&Handlers::beginOptionsCopyAttachmentsFromArray), bindBare(&Handlers::endOptionsCopyAttachmentsFromArray)); // .options.copyAttachmentsFrom[]
|
||||
beginDict(bindJSON(&Handlers::beginOptionsCopyAttachmentsFrom), bindBare(&Handlers::endOptionsCopyAttachmentsFrom)); // .options.copyAttachmentsFrom
|
||||
beginArray(bindJSON(&Handlers::beginCopyAttachmentsFromArray), bindBare(&Handlers::endCopyAttachmentsFromArray)); // .copyAttachmentsFrom[]
|
||||
beginDict(bindJSON(&Handlers::beginCopyAttachmentsFrom), bindBare(&Handlers::endCopyAttachmentsFrom)); // .copyAttachmentsFrom
|
||||
pushKey("file");
|
||||
setupOptionsCopyAttachmentsFromFile();
|
||||
setupCopyAttachmentsFromFile();
|
||||
popHandler(); // key: file
|
||||
pushKey("password");
|
||||
setupOptionsCopyAttachmentsFromPassword();
|
||||
setupCopyAttachmentsFromPassword();
|
||||
popHandler(); // key: password
|
||||
pushKey("prefix");
|
||||
addParameter([this](char const* p) { c_copy_att->prefix(p); });
|
||||
popHandler(); // key: prefix
|
||||
popHandler(); // array: .options.copyAttachmentsFrom[]
|
||||
popHandler(); // array: .copyAttachmentsFrom[]
|
||||
popHandler(); // key: copyAttachmentsFrom
|
||||
pushKey("collate");
|
||||
addParameter([this](char const* p) { c_main->collate(p); });
|
||||
@ -383,18 +369,18 @@ pushKey("optimizeImages");
|
||||
addBare([this]() { c_main->optimizeImages(); });
|
||||
popHandler(); // key: optimizeImages
|
||||
pushKey("pages");
|
||||
beginArray(bindJSON(&Handlers::beginOptionsPagesArray), bindBare(&Handlers::endOptionsPagesArray)); // .options.pages[]
|
||||
beginDict(bindJSON(&Handlers::beginOptionsPages), bindBare(&Handlers::endOptionsPages)); // .options.pages
|
||||
beginArray(bindJSON(&Handlers::beginPagesArray), bindBare(&Handlers::endPagesArray)); // .pages[]
|
||||
beginDict(bindJSON(&Handlers::beginPages), bindBare(&Handlers::endPages)); // .pages
|
||||
pushKey("file");
|
||||
setupOptionsPagesFile();
|
||||
setupPagesFile();
|
||||
popHandler(); // key: file
|
||||
pushKey("password");
|
||||
setupOptionsPagesPassword();
|
||||
setupPagesPassword();
|
||||
popHandler(); // key: password
|
||||
pushKey("range");
|
||||
setupOptionsPagesRange();
|
||||
setupPagesRange();
|
||||
popHandler(); // key: range
|
||||
popHandler(); // array: .options.pages[]
|
||||
popHandler(); // array: .pages[]
|
||||
popHandler(); // key: pages
|
||||
pushKey("removePageLabels");
|
||||
addBare([this]() { c_main->removePageLabels(); });
|
||||
@ -403,12 +389,12 @@ pushKey("rotate");
|
||||
addParameter([this](char const* p) { c_main->rotate(p); });
|
||||
popHandler(); // key: rotate
|
||||
pushKey("overlay");
|
||||
beginDict(bindJSON(&Handlers::beginOptionsOverlay), bindBare(&Handlers::endOptionsOverlay)); // .options.overlay
|
||||
beginDict(bindJSON(&Handlers::beginOverlay), bindBare(&Handlers::endOverlay)); // .overlay
|
||||
pushKey("file");
|
||||
setupOptionsOverlayFile();
|
||||
setupOverlayFile();
|
||||
popHandler(); // key: file
|
||||
pushKey("password");
|
||||
setupOptionsOverlayPassword();
|
||||
setupOverlayPassword();
|
||||
popHandler(); // key: password
|
||||
pushKey("from");
|
||||
addParameter([this](char const* p) { c_uo->from(p); });
|
||||
@ -421,12 +407,12 @@ addParameter([this](char const* p) { c_uo->to(p); });
|
||||
popHandler(); // key: to
|
||||
popHandler(); // key: overlay
|
||||
pushKey("underlay");
|
||||
beginDict(bindJSON(&Handlers::beginOptionsUnderlay), bindBare(&Handlers::endOptionsUnderlay)); // .options.underlay
|
||||
beginDict(bindJSON(&Handlers::beginUnderlay), bindBare(&Handlers::endUnderlay)); // .underlay
|
||||
pushKey("file");
|
||||
setupOptionsUnderlayFile();
|
||||
setupUnderlayFile();
|
||||
popHandler(); // key: file
|
||||
pushKey("password");
|
||||
setupOptionsUnderlayPassword();
|
||||
setupUnderlayPassword();
|
||||
popHandler(); // key: password
|
||||
pushKey("from");
|
||||
addParameter([this](char const* p) { c_uo->from(p); });
|
||||
@ -438,4 +424,18 @@ pushKey("to");
|
||||
addParameter([this](char const* p) { c_uo->to(p); });
|
||||
popHandler(); // key: to
|
||||
popHandler(); // key: underlay
|
||||
popHandler(); // key: options
|
||||
pushKey("warningExit0");
|
||||
addBare([this]() { c_main->warningExit0(); });
|
||||
popHandler(); // key: warningExit0
|
||||
pushKey("jobJsonFile");
|
||||
addParameter([this](char const* p) { c_main->jobJsonFile(p); });
|
||||
popHandler(); // key: jobJsonFile
|
||||
pushKey("preserveUnreferencedResources");
|
||||
addBare([this]() { c_main->preserveUnreferencedResources(); });
|
||||
popHandler(); // key: preserveUnreferencedResources
|
||||
pushKey("requiresPassword");
|
||||
addBare([this]() { c_main->requiresPassword(); });
|
||||
popHandler(); // key: requiresPassword
|
||||
pushKey("isEncrypted");
|
||||
addBare([this]() { c_main->isEncrypted(); });
|
||||
popHandler(); // key: isEncrypted
|
||||
|
@ -1,14 +1,10 @@
|
||||
static constexpr char const* JOB_SCHEMA_DATA = R"({
|
||||
"input": {
|
||||
"file": "input filename",
|
||||
"inputFile": "input filename",
|
||||
"password": "specify password",
|
||||
"passwordFile": "read password from a file",
|
||||
"empty": "empty input file"
|
||||
},
|
||||
"output": {
|
||||
"file": "output filename",
|
||||
"replaceInput": "set to true to replace input",
|
||||
"options": {
|
||||
"empty": "empty input file",
|
||||
"outputFile": "output filename",
|
||||
"replaceInput": "replace input with output",
|
||||
"qdf": "enable viewing PDF code in a text editor",
|
||||
"preserveUnreferenced": "preserve unreferenced objects",
|
||||
"newlineBeforeEndstream": "force a newline before endstream",
|
||||
@ -66,10 +62,7 @@ static constexpr char const* JOB_SCHEMA_DATA = R"({
|
||||
"allowInsecure": "allow empty owner passwords",
|
||||
"forceR5": "use unsupported R=5 encryption"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"inspect": {
|
||||
"check": "partially check whether PDF is valid",
|
||||
"checkLinearization": "check linearization tables",
|
||||
"filteredStreamData": "show filtered stream data",
|
||||
@ -90,9 +83,7 @@ static constexpr char const* JOB_SCHEMA_DATA = R"({
|
||||
],
|
||||
"jsonObject": [
|
||||
"restrict which objects are in JSON"
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
],
|
||||
"allowWeakCrypto": "allow insecure cryptographic algorithms",
|
||||
"keepFilesOpen": "manage keeping multiple files open",
|
||||
"keepFilesOpenThreshold": "set threshold for keepFilesOpen",
|
||||
@ -159,6 +150,10 @@ static constexpr char const* JOB_SCHEMA_DATA = R"({
|
||||
"from": "source pages for underlay/overlay",
|
||||
"repeat": "overlay/underlay pages to repeat",
|
||||
"to": "destination pages for underlay/overlay"
|
||||
}
|
||||
}
|
||||
},
|
||||
"warningExit0": "exit 0 even with warnings",
|
||||
"jobJsonFile": "job JSON file",
|
||||
"preserveUnreferencedResources": "use removeUnreferencedResourcesNo",
|
||||
"requiresPassword": "silently test a file's password",
|
||||
"isEncrypted": "silently test whether a file is encrypted"
|
||||
})";
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
qpdf: error with job-json file bad-json-bare-option-false.json: .output.options.qdf: value must be true
|
||||
qpdf: error with job-json file bad-json-bare-option-false.json: .qdf: value must be true
|
||||
Run qpdf--job-json-help for information on the file format.
|
||||
|
||||
For help:
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
qpdf: error with job-json file bad-json-choice-mismatch.json: .output.options.objectStreams: unexpected value; expected one of disable, preserve, generate
|
||||
qpdf: error with job-json file bad-json-choice-mismatch.json: .objectStreams: unexpected value; expected one of disable, preserve, generate
|
||||
Run qpdf--job-json-help for information on the file format.
|
||||
|
||||
For help:
|
||||
|
@ -1,7 +1,3 @@
|
||||
{
|
||||
"output": {
|
||||
"options": {
|
||||
"qdf": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,3 @@
|
||||
{
|
||||
"output": {
|
||||
"options": {
|
||||
"objectStreams": "potato"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,4 @@
|
||||
{
|
||||
"output": {
|
||||
"options": {
|
||||
"encrypt": {
|
||||
"userPassword": "",
|
||||
"ownerPassword": "someOwnerThing",
|
||||
@ -10,5 +8,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,7 @@
|
||||
{
|
||||
"output": {
|
||||
"options": {
|
||||
"encrypt": {
|
||||
"userPassword": "",
|
||||
"256bit": {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,6 @@
|
||||
{
|
||||
"output": {
|
||||
"options": {
|
||||
"encrypt": {
|
||||
"userPassword": "",
|
||||
"ownerPassword": "someOwnerThing"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
qpdf: error with job-json file bad-json-json-error.json: JSON: offset 130: unexpected dictionary end delimiter
|
||||
qpdf: error with job-json file bad-json-json-error.json: JSON: offset 83: unexpected dictionary end delimiter
|
||||
Run qpdf--job-json-help for information on the file format.
|
||||
|
||||
For help:
|
||||
|
@ -1,10 +1,6 @@
|
||||
{
|
||||
"output": {
|
||||
"options": {
|
||||
"encrypt": {
|
||||
"userPassword": "",
|
||||
"ownerPassword": "someOwnerThing",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
{
|
||||
"options": {
|
||||
"pages": [
|
||||
{
|
||||
"range": "1-z"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"output": {
|
||||
"potato": {
|
||||
},
|
||||
"encrypt": {
|
||||
"userPassword": "",
|
||||
"ownerPassword": "someOwnerThing",
|
||||
@ -8,5 +8,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
qpdf: error with job-json file bad-json-schema-error.json: qpdf: job json has errors:
|
||||
json key ".output": key "potato" is not present in schema but appears in object
|
||||
top-level object: key "potato" is not present in schema but appears in object
|
||||
Run qpdf--job-json-help for information on the file format.
|
||||
|
||||
For help:
|
||||
|
@ -1,14 +1,7 @@
|
||||
{
|
||||
"input": {
|
||||
"file": "minimal.pdf"
|
||||
},
|
||||
"output": {
|
||||
"file": "a.pdf",
|
||||
"options": {
|
||||
"staticId": true
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"inputFile": "minimal.pdf",
|
||||
"outputFile": "a.pdf",
|
||||
"staticId": true,
|
||||
"addAttachment": [
|
||||
{
|
||||
"file": "auto-txt",
|
||||
@ -24,4 +17,3 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,6 @@
|
||||
{
|
||||
"input": {
|
||||
"file": "minimal.pdf"
|
||||
},
|
||||
"output": {
|
||||
"file": "a.pdf",
|
||||
"options": {
|
||||
"inputFile": "minimal.pdf",
|
||||
"outputFile": "a.pdf",
|
||||
"deterministicId": true,
|
||||
"objectStreams": "generate"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,7 @@
|
||||
{
|
||||
"input": {
|
||||
"file": "minimal.pdf"
|
||||
},
|
||||
"output": {
|
||||
"file": "a.pdf",
|
||||
"options": {
|
||||
"staticId": true
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"inputFile": "minimal.pdf",
|
||||
"outputFile": "a.pdf",
|
||||
"staticId": true,
|
||||
"copyAttachmentsFrom": [
|
||||
{
|
||||
"file": "job-json-add-attachments.pdf"
|
||||
@ -23,4 +16,3 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,7 @@
|
||||
{
|
||||
"input": {
|
||||
"empty": true
|
||||
},
|
||||
"output": {
|
||||
"file": "a.pdf",
|
||||
"options": {
|
||||
"staticId": true
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"empty": true,
|
||||
"outputFile": "a.pdf",
|
||||
"staticId": true,
|
||||
"pages": [
|
||||
{
|
||||
"file": "minimal.pdf"
|
||||
@ -20,4 +13,3 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,6 @@
|
||||
{
|
||||
"input": {
|
||||
"file": "fxo-blue.pdf"
|
||||
},
|
||||
"output": {
|
||||
"file": "a.pdf",
|
||||
"options": {
|
||||
"inputFile": "fxo-blue.pdf",
|
||||
"outputFile": "a.pdf",
|
||||
"staticId": true,
|
||||
"staticAesIv": true,
|
||||
"encrypt": {
|
||||
@ -15,5 +11,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,6 @@
|
||||
{
|
||||
"input": {
|
||||
"file": "minimal.pdf"
|
||||
},
|
||||
"output": {
|
||||
"file": "a.pdf",
|
||||
"options": {
|
||||
"inputFile": "minimal.pdf",
|
||||
"outputFile": "a.pdf",
|
||||
"staticId": true,
|
||||
"staticAesIv": true,
|
||||
"encrypt": {
|
||||
@ -16,5 +12,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,19 +1,11 @@
|
||||
{
|
||||
"input": {
|
||||
"file": "minimal.pdf"
|
||||
},
|
||||
"output": {
|
||||
"file": "a.pdf",
|
||||
"options": {
|
||||
"inputFile": "minimal.pdf",
|
||||
"outputFile": "a.pdf",
|
||||
"staticId": true,
|
||||
"encrypt": {
|
||||
"userPassword": "u",
|
||||
"ownerPassword": "o",
|
||||
"40bit": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"allowWeakCrypto": true
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,8 @@
|
||||
{
|
||||
"input": {
|
||||
"file": "20-pages.pdf",
|
||||
"password": "user"
|
||||
},
|
||||
"output": {
|
||||
"file": "a.pdf",
|
||||
"options": {
|
||||
"inputFile": "20-pages.pdf",
|
||||
"password": "user",
|
||||
"outputFile": "a.pdf",
|
||||
"staticId": true,
|
||||
"staticAesIv": true,
|
||||
"compressStreams": "n"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,7 @@
|
||||
{
|
||||
"input": {
|
||||
"file": "minimal.pdf"
|
||||
},
|
||||
"output": {
|
||||
"file": "a.pdf",
|
||||
"options": {
|
||||
"inputFile": "minimal.pdf",
|
||||
"outputFile": "a.pdf",
|
||||
"staticId": true,
|
||||
"linearize": true,
|
||||
"compressStreams": "n"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,5 @@
|
||||
{
|
||||
"input": {
|
||||
"file": "minimal.pdf"
|
||||
},
|
||||
"inspect": {
|
||||
"inputFile": "minimal.pdf",
|
||||
"json": "1",
|
||||
"jsonKey": [
|
||||
"pages",
|
||||
@ -13,4 +10,3 @@
|
||||
"5"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,6 @@
|
||||
{
|
||||
"input": {
|
||||
"file": "a.pdf"
|
||||
},
|
||||
"output": {
|
||||
"inputFile": "a.pdf",
|
||||
"replaceInput": true,
|
||||
"options": {
|
||||
"staticId": true,
|
||||
"objectStreams": "generate"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,7 @@
|
||||
{
|
||||
"input": {
|
||||
"file": "minimal.pdf"
|
||||
},
|
||||
"output": {
|
||||
"file": "a.pdf",
|
||||
"options": {
|
||||
"staticId": true
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"inputFile": "minimal.pdf",
|
||||
"outputFile": "a.pdf",
|
||||
"staticId": true,
|
||||
"underlay": {
|
||||
"file": "20-pages.pdf",
|
||||
"password": "user",
|
||||
@ -20,4 +13,3 @@
|
||||
"from": "7"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,9 @@
|
||||
{
|
||||
"input": {
|
||||
"file": "20-pages.pdf",
|
||||
"password": "owner"
|
||||
},
|
||||
"output": {
|
||||
"file": "a.pdf",
|
||||
"options": {
|
||||
"inputFile": "20-pages.pdf",
|
||||
"password": "owner",
|
||||
"outputFile": "a.pdf",
|
||||
"staticId": true,
|
||||
"decrypt": true
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"decrypt": true,
|
||||
"underlay": {
|
||||
"file": "fxo-green.pdf"
|
||||
},
|
||||
@ -20,4 +13,3 @@
|
||||
"repeat": "3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,4 @@
|
||||
{
|
||||
"output": {
|
||||
"options": {
|
||||
"encrypt": {
|
||||
"userPassword": "",
|
||||
"ownerPassword": "",
|
||||
@ -8,5 +6,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
{
|
||||
"inspect": {
|
||||
"showEncryption": true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user