mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-02 22:50:20 +00:00
Allow repetition of overlay/underlay
This is just QPDFJob wiring.
This commit is contained in:
parent
0161f62e38
commit
6cf04b0a88
8
job.sums
8
job.sums
@ -7,13 +7,13 @@ include/qpdf/auto_job_c_enc.hh 28446f3c32153a52afa239ea40503e6cc8ac2c026813526a3
|
||||
include/qpdf/auto_job_c_main.hh dbfc221d1533120d1aa9c361d8d2483dea5fcb1c0fd95144d98d305e64ed32a6
|
||||
include/qpdf/auto_job_c_pages.hh 09ca15649cc94fdaf6d9bdae28a20723f2a66616bf15aa86d83df31051d82506
|
||||
include/qpdf/auto_job_c_uo.hh 9c2f98a355858dd54d0bba444b73177a59c9e56833e02fa6406f429c07f39e62
|
||||
job.yml 790dd0f62f124a6cc97cc54bae992a1f1b1f3a9b4f0294bcf123868f3d3b39d3
|
||||
job.yml 53cad86659db6722e8f415aacb19fc51ab81bb1589c3cb8f65ec893bb4bf5566
|
||||
libqpdf/qpdf/auto_job_decl.hh 20d6affe1e260f5a1af4f1d82a820b933835440ff03020e877382da2e8dac6c6
|
||||
libqpdf/qpdf/auto_job_help.hh 5808d936f6cd41af278ca298ed0c0762ce0a16956cbe1757a40e4443485cf31e
|
||||
libqpdf/qpdf/auto_job_init.hh 19d1da7c4c0c635bd1c5db8d5f17df8edad3442f8eba006adb075cec295fa158
|
||||
libqpdf/qpdf/auto_job_json_decl.hh 7c7fbf9f7fdf7a1f5f7cedb09af16b8dcf30b6860947bd38c970385b05d22fc1
|
||||
libqpdf/qpdf/auto_job_json_init.hh 436567565691252d62a1852564729925ef996e78eba9ea3d947829c05f72a309
|
||||
libqpdf/qpdf/auto_job_schema.hh 30dcb22bfa76d731dfa2cc2a226d7deaa25145f964b19ab44161356c909e4dc1
|
||||
libqpdf/qpdf/auto_job_json_decl.hh 843892c8e8652a86b7eb573893ef24050b7f36fe313f7251874be5cd4cdbe3fd
|
||||
libqpdf/qpdf/auto_job_json_init.hh a87256c082427ec0318223762472970b2eced535c0c8b0288d45c8cdaaf62f74
|
||||
libqpdf/qpdf/auto_job_schema.hh 5dac568dff39614e161a0af59a0f328f1e28edf69b96f08bb76fd592d51bb053
|
||||
manual/_ext/qpdf.py 6add6321666031d55ed4aedf7c00e5662bba856dfcd66ccb526563bffefbb580
|
||||
manual/cli.rst 0e6a957defa4839abb9a69414de6a5ec5524fd6ff56fe9abf8f241bee54813e2
|
||||
manual/qpdf.1 7250b4e26033fca6b6b9cb23a51e1f46c26f8033663901d4af06b451e287e814
|
||||
|
20
job.yml
20
job.yml
@ -446,17 +446,17 @@ json:
|
||||
set-page-labels:
|
||||
- null
|
||||
overlay:
|
||||
UO.file:
|
||||
UO.password:
|
||||
from:
|
||||
repeat:
|
||||
to:
|
||||
- UO.file:
|
||||
UO.password:
|
||||
from:
|
||||
repeat:
|
||||
to:
|
||||
underlay:
|
||||
UO.file:
|
||||
UO.password:
|
||||
from:
|
||||
repeat:
|
||||
to:
|
||||
- UO.file:
|
||||
UO.password:
|
||||
from:
|
||||
repeat:
|
||||
to:
|
||||
warning-exit-0:
|
||||
job-json-file:
|
||||
preserve-unreferenced-resources:
|
||||
|
@ -521,6 +521,18 @@ Handlers::setupPagesPassword()
|
||||
addParameter([this](char const* p) { c_pages->password(p); });
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOverlayArray(JSON)
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endOverlayArray()
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginOverlay(JSON j)
|
||||
{
|
||||
@ -548,6 +560,18 @@ Handlers::setupOverlayPassword()
|
||||
addParameter([this](char const* p) { c_uo->password(p); });
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginUnderlayArray(JSON)
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::endUnderlayArray()
|
||||
{
|
||||
// nothing needed
|
||||
}
|
||||
|
||||
void
|
||||
Handlers::beginUnderlay(JSON j)
|
||||
{
|
||||
|
@ -46,10 +46,14 @@ void setupPagesPassword();
|
||||
void beginSetPageLabelsArray(JSON);
|
||||
void endSetPageLabelsArray();
|
||||
void setupSetPageLabels();
|
||||
void beginOverlayArray(JSON);
|
||||
void endOverlayArray();
|
||||
void beginOverlay(JSON);
|
||||
void endOverlay();
|
||||
void setupOverlayFile();
|
||||
void setupOverlayPassword();
|
||||
void beginUnderlayArray(JSON);
|
||||
void endUnderlayArray();
|
||||
void beginUnderlay(JSON);
|
||||
void endUnderlay();
|
||||
void setupUnderlayFile();
|
||||
|
@ -427,6 +427,7 @@ setupSetPageLabels();
|
||||
popHandler(); // array: .setPageLabels[]
|
||||
popHandler(); // key: setPageLabels
|
||||
pushKey("overlay");
|
||||
beginArray(bindJSON(&Handlers::beginOverlayArray), bindBare(&Handlers::endOverlayArray)); // .overlay[]
|
||||
beginDict(bindJSON(&Handlers::beginOverlay), bindBare(&Handlers::endOverlay)); // .overlay
|
||||
pushKey("file");
|
||||
setupOverlayFile();
|
||||
@ -443,8 +444,10 @@ popHandler(); // key: repeat
|
||||
pushKey("to");
|
||||
addParameter([this](std::string const& p) { c_uo->to(p); });
|
||||
popHandler(); // key: to
|
||||
popHandler(); // array: .overlay[]
|
||||
popHandler(); // key: overlay
|
||||
pushKey("underlay");
|
||||
beginArray(bindJSON(&Handlers::beginUnderlayArray), bindBare(&Handlers::endUnderlayArray)); // .underlay[]
|
||||
beginDict(bindJSON(&Handlers::beginUnderlay), bindBare(&Handlers::endUnderlay)); // .underlay
|
||||
pushKey("file");
|
||||
setupUnderlayFile();
|
||||
@ -461,6 +464,7 @@ popHandler(); // key: repeat
|
||||
pushKey("to");
|
||||
addParameter([this](std::string const& p) { c_uo->to(p); });
|
||||
popHandler(); // key: to
|
||||
popHandler(); // array: .underlay[]
|
||||
popHandler(); // key: underlay
|
||||
pushKey("warningExit0");
|
||||
addBare([this]() { c_main->warningExit0(); });
|
||||
|
@ -151,20 +151,24 @@ static constexpr char const* JOB_SCHEMA_DATA = R"({
|
||||
"setPageLabels": [
|
||||
"number pages for the entire document"
|
||||
],
|
||||
"overlay": {
|
||||
"file": "source for pages",
|
||||
"password": "password for encrypted file",
|
||||
"from": "source pages for underlay/overlay",
|
||||
"repeat": "overlay/underlay pages to repeat",
|
||||
"to": "destination pages for underlay/overlay"
|
||||
},
|
||||
"underlay": {
|
||||
"file": "source for pages",
|
||||
"password": "password for encrypted file",
|
||||
"from": "source pages for underlay/overlay",
|
||||
"repeat": "overlay/underlay pages to repeat",
|
||||
"to": "destination pages for underlay/overlay"
|
||||
},
|
||||
"overlay": [
|
||||
{
|
||||
"file": "source for pages",
|
||||
"password": "password for encrypted file",
|
||||
"from": "source pages for underlay/overlay",
|
||||
"repeat": "overlay/underlay pages to repeat",
|
||||
"to": "destination pages for underlay/overlay"
|
||||
}
|
||||
],
|
||||
"underlay": [
|
||||
{
|
||||
"file": "source for pages",
|
||||
"password": "password for encrypted file",
|
||||
"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 removeUnreferencedResources=no",
|
||||
|
Loading…
Reference in New Issue
Block a user