-
Notifications
You must be signed in to change notification settings - Fork 0
/
job.yml
464 lines (461 loc) · 10.1 KB
/
job.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
# See "HOW TO ADD A COMMAND-LINE ARGUMENT" in README-maintainer.
# REMEMBER: if you add an optional_choices or optional_parameter, you
# have to explicitly remember to implement the overloaded config
# method that takes no arguments. Since no generated code will call it
# automatically, there is no automated reminder to do this. If you
# forget, it will be a link error if someone tries to call it.
choices:
yn:
- "y"
- "n"
password_mode:
- bytes
- hex-bytes
- unicode
- auto
stream_data:
- compress
- preserve
- uncompress
decode_level:
- none
- generalized
- specialized
- all
object_streams:
- disable
- preserve
- generate
remove_unref:
- auto
- "yes"
- "no"
flatten:
- all
- print
- screen
json_key:
# The list of selectable top-level keys id duplicated in the
# following places: job.yml, QPDFJob::json_schema, and
# QPDFJob::doJSON.
- acroform
- attachments
- encrypt
- objectinfo # only v1
- objects # only v1
- outlines
- pagelabels
- pages
- qpdf # only v2
json_output:
- 2
- latest
json_stream_data:
- none
- inline
- file
json_version:
- 1
- 2
- latest
enc_bits:
- 40
- 128
- 256
print128:
- full
- low
- none
modify128:
- all
- annotate
- form
- assembly
- none
options:
- table: help
bare:
- version
- copyright
- show-crypto
- job-json-help
optional_choices:
json-help: json_version
- table: main
config: c_main
manual:
- add-attachment
- copy-attachments-from
- encrypt
- overlay
- pages
- underlay
- empty
- replace-input
- set-page-labels
positional: true
bare:
- add-attachment
- allow-weak-crypto
- check
- check-linearization
- coalesce-contents
- copy-attachments-from
- decrypt
- deterministic-id
- empty
- encrypt
- externalize-inline-images
- filtered-stream-data
- flatten-rotation
- generate-appearances
- ignore-xref-streams
- is-encrypted
- json-input
- keep-inline-images
- linearize
- list-attachments
- newline-before-endstream
- no-original-object-ids
- no-warn
- optimize-images
- overlay
- pages
- password-is-hex-key
- preserve-unreferenced
- preserve-unreferenced-resources
- progress
- qdf
- raw-stream-data
- recompress-flate
- remove-page-labels
- replace-input
- report-memory-usage
- requires-password
- remove-restrictions
- set-page-labels
- show-encryption
- show-encryption-key
- show-linearization
- show-npages
- show-pages
- show-xref
- static-aes-iv
- static-id
- suppress-password-recovery
- suppress-recovery
- test-json-schema
- underlay
- verbose
- warning-exit-0
- with-images
optional_parameter:
- collate
- split-pages
required_parameter:
compression-level: level
copy-encryption: file
encryption-file-password: password
force-version: version
ii-min-bytes: minimum
job-json-file: file
json-object: trailer
keep-files-open-threshold: count
linearize-pass1: filename
min-version: version
oi-min-area: minimum
oi-min-height: minimum
oi-min-width: minimum
password: password
password-file: password
remove-attachment: attachment
rotate: "[+|-]angle"
show-attachment: attachment
show-object: trailer
json-stream-prefix: stream-file-prefix
update-from-json: qpdf-json file
required_choices:
compress-streams: yn
decode-level: decode_level
flatten-annotations: flatten
json-key: json_key
json-stream-data: json_stream_data
keep-files-open: yn
normalize-content: yn
object-streams: object_streams
password-mode: password_mode
remove-unreferenced-resources: remove_unref
stream-data: stream_data
optional_choices:
json: json_version
json-output: json_output
- table: pages
config: c_pages
prefix: Pages
positional: true
required_parameter:
file: file
range: page-range
password: password
- table: encryption
config: c_main
prefix: Enc
positional: true
manual:
- user-password
- owner-password
- bits
required_parameter:
user-password: user_password
owner-password: owner_password
required_choices:
bits: enc_bits
- table: 40-bit encryption
config: c_enc
config_prefix: Enc
prefix: Enc40
required_choices:
extract: yn
annotate: yn
print: yn
modify: yn
- table: 128-bit encryption
config: c_enc
config_prefix: Enc
prefix: Enc128
bare:
- cleartext-metadata
- force-V4
required_choices:
accessibility: yn
extract: yn
print: print128
assemble: yn
annotate: yn
form: yn
modify-other: yn
modify: modify128
use-aes: yn
- table: 256-bit encryption
config: c_enc
config_prefix: Enc
prefix: Enc256
bare:
- cleartext-metadata
- force-R5
- allow-insecure
required_choices:
accessibility: yn
extract: yn
print: print128
assemble: yn
annotate: yn
form: yn
modify-other: yn
modify: modify128
- table: underlay/overlay
config: c_uo
prefix: UO
positional: true
required_parameter:
file: file
to: page-range
from: page-range
repeat: page-range
password: password
- table: attachment
config: c_att
prefix: Att
positional: true
bare:
- replace
required_parameter:
key: attachment-key
filename: filename
creationdate: creation-date
moddate: modification-date
mimetype: mime/type
description: description
- table: copy attachment
config: c_copy_att
prefix: CopyAtt
positional: true
required_parameter:
prefix: prefix
password: password
- table: set page labels
prefix: PageLabels
positional: true
json:
# The structure of this section defines what the json input to
# QPDFJob looks like. If a key starts with underscore, it does not
# map to a command-line argument. If the value is a string, that is
# the help information. Otherwise, if the value is null, it has to
# match a command-line option, and its properties and help come from
# other information known by generate_auto_job. This information is
# used to construct a "schema" (as in JSON.hh) for the json input to
# QPDFJob. The leading underscore is removed. If a key starts with a
# double underscore, it corresponds to a command-line argument that
# does not have a counterpart in the JSON. This signals that the
# command-line argument was not forgotten, but it is otherwise
# ignored by the JSON. *NOTE*: all keys are converted to camelCase
# for the schema and must appear that way in the user-supplied json.
# This makes it more convenient to populate JSON objects in some
# languages.
# input
_inputFile: "input filename"
main.password:
password-file:
empty:
json-input:
# output
_outputFile: "output filename"
replace-input:
# output options
qdf:
preserve-unreferenced:
newline-before-endstream:
normalize-content:
stream-data:
compress-streams:
recompress-flate:
decode-level:
decrypt:
deterministic-id:
static-aes-iv:
static-id:
no-original-object-ids:
copy-encryption:
encryption-file-password:
linearize:
linearize-pass1:
object-streams:
min-version:
force-version:
progress:
split-pages:
json-output:
remove-restrictions:
encrypt:
user-password:
owner-password:
__bits:
_40bit:
Enc40.annotate:
Enc40.extract:
Enc40.modify:
Enc40.print:
_128bit:
Enc128.accessibility:
Enc128.annotate:
Enc128.assemble:
Enc128.cleartext-metadata:
Enc128.extract:
Enc128.form:
Enc128.modify-other:
Enc128.modify:
Enc128.print:
force-V4:
use-aes:
_256bit:
Enc256.accessibility:
Enc256.annotate:
Enc256.assemble:
Enc256.cleartext-metadata:
Enc256.extract:
Enc256.form:
Enc256.modify-other:
Enc256.modify:
Enc256.print:
allow-insecure:
force-R5:
# inspect
check:
check-linearization:
filtered-stream-data:
raw-stream-data:
show-encryption:
show-encryption-key:
show-linearization:
show-npages:
show-object:
show-pages:
show-xref:
with-images:
list-attachments:
show-attachment:
json:
json-key:
- null
json-object:
- null
json-stream-data:
json-stream-prefix:
# other options
update-from-json:
allow-weak-crypto:
keep-files-open:
keep-files-open-threshold:
no-warn:
verbose:
test-json-schema:
ignore-xref-streams:
password-is-hex-key:
password-mode:
suppress-password-recovery:
suppress-recovery:
coalesce-contents:
compression-level:
externalize-inline-images:
ii-min-bytes:
remove-unreferenced-resources:
add-attachment:
- _file: "file to attach"
creationdate:
description:
filename:
key:
mimetype:
moddate:
replace:
remove-attachment:
- null
copy-attachments-from:
- _file: "file to copy attachments from"
CopyAtt.password:
prefix:
collate:
flatten-annotations:
flatten-rotation:
generate-appearances:
keep-inline-images:
oi-min-area:
oi-min-height:
oi-min-width:
optimize-images:
pages:
- Pages.file:
Pages.password:
range:
remove-page-labels:
report-memory-usage:
rotate:
set-page-labels:
- null
overlay:
- UO.file:
UO.password:
from:
repeat:
to:
underlay:
- UO.file:
UO.password:
from:
repeat:
to:
warning-exit-0:
job-json-file:
preserve-unreferenced-resources:
requires-password:
is-encrypted: