2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-02 11:46:35 +00:00
Commit Graph

2570 Commits

Author SHA1 Message Date
Jay Berkenbilt
3c138be0ef Update job.sums from doc typo PR 2022-02-04 09:02:22 -05:00
Jay Berkenbilt
956ecf2bc3 Remove duplicate ChangeLog entry 2022-02-04 07:43:39 -05:00
m-holger
1925ffd467 Fix --check-linearization of non-linearized files (fixes #615) 2022-02-04 06:52:38 -05:00
m-holger
4d507251fe Change QPDFExc type to unsupported for /Standard filter 2022-02-02 14:07:32 -06:00
m-holger
e813176bc0 Fix some doc typos 2022-02-02 14:07:32 -06:00
Jay Berkenbilt
bc6403708c Update performance check to use newer --help 2022-02-01 18:39:01 -05:00
Jay Berkenbilt
2fd5a43f67 Add ChangeLog entries for refactoring work 2022-02-01 17:17:05 -05:00
Jay Berkenbilt
42bff9f458 QPDFJob: let initializeFromArgv just take argv, not argc
Let argv be a null-terminated array. There is already code that
assumes this, and it makes it easier to construct the arguments.
2022-02-01 13:50:58 -05:00
Jay Berkenbilt
a0d9d9923c Finish QPDFJob examples and add tests for them 2022-02-01 13:50:58 -05:00
Jay Berkenbilt
b02d37bc0a Make QPDFArgParser accept const argv
This makes it much more convention to use the initializeFromArgv
functions since you can use string literals.
2022-02-01 13:50:58 -05:00
Jay Berkenbilt
bc4e2320e7 Add qpdfjob-c.h -- simple C API around parts of QPDFJob 2022-02-01 09:04:55 -05:00
Jay Berkenbilt
03e67a28fe Move QTC::TC for qpdf to QPDFJob
All the coverage cases that used to be in qpdf.cc are now in
QPDFJob*.cc. It doesn't really matter, but better to follow the
convention of starting with the class that includes the coverage call.
2022-02-01 09:04:55 -05:00
Jay Berkenbilt
b42f3e1d15 Move more code from qpdf.cc into QPDFJob 2022-02-01 09:04:55 -05:00
Jay Berkenbilt
cc5485dac1 QPDFJob: documentation 2022-02-01 09:04:55 -05:00
Jay Berkenbilt
5a7bb3474e generate_auto_job: generate overloaded config decls for optional
For optional parameter/choices, generate an overloaded config method
that takes no arguments. This makes it possible to convert from a bare
argument to one that takes an optional parameter without breaking
binary compatibility.
2022-02-01 09:04:55 -05:00
Jay Berkenbilt
5953116634 Clean up documentation and help around json options 2022-01-31 18:40:11 -05:00
Jay Berkenbilt
606420ab54 Tweak short text for job schema help 2022-01-31 18:26:03 -05:00
Jay Berkenbilt
21b9290785 QPDFJob json: make bare arguments expect the empty string
Changing from bool requiring true to string requiring the empty string
is more consistent with the CLI and makes it possible to add an
optional parameter or choices later without breaking compatibility.
2022-01-31 18:16:09 -05:00
Jay Berkenbilt
ea96330bb6 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.
2022-01-31 18:16:09 -05:00
Jay Berkenbilt
47f33cec25 QPDFJob: add test cases 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
e3506253f1 Add optional version to --json 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
b4fb9b4ec3 Remove outdated comments 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
d5004edb40 job.yml: remove stray line 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
caa00556cf Change filename or path to file in json and QPDFJob
Use "file" consistently for specifying a file path. We use "filename"
when adding attachments for a completely different purpose.
2022-01-31 15:57:45 -05:00
Jay Berkenbilt
1a3ed1ee85 job json: move deterministic-id into output options 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
81b6314cb5 QPDFJob: fix logic errors in handling arrays
The code was assuming everything was happening inside dictionaries.
Instead, make the dictionary key handler creatino explicit only when
iterating through dictionary keys.
2022-01-31 15:57:45 -05:00
Jay Berkenbilt
f99e0af49c QPDFJob: rename function that returns job schema 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
9e3b321b24 TODO note 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
d9e00e8e5b generate_auto_job: break out build_schema for refactor 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
1355d95d08 QPDFJob: partial mode for initializeFromJson 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
cd30f626fe QPDFJob: remove from json a few things that only make sense from CLI 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
eeffc69d87 QPDFJob_json: implement handlers for pages 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
fa9676557e QDPFJob: incorporate change to JSONHandler for array start function 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
3b60224bae JSONHandler: pass JSON object to array start function 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
b74e7989c3 QPDFJob_json: implement handlers except pages 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
e01bbccb40 QPDFJob: incorporate change to JSONHandler for dict start function 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
ce3406e93f JSONHandler: pass JSON object to dict start function
If some keys depend on others, we have to check up front since there
is no control of what order key handlers will be called. Anyway, keys
are unordered in json, so we don't want to depend on ordering.
2022-01-31 15:57:45 -05:00
Jay Berkenbilt
11a86e444d QPDFJob: autogenerate json init and declarations
Now still have to go through and implement the handlers.
2022-01-31 15:57:45 -05:00
Jay Berkenbilt
842a9d928e QPDFJob_json: add code to register handlers 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
967a2b9f28 Fix typo in error message 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
a7b0aec2cf Fix false compiler warning in debug mode 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
28278e27ea Keep JSONHandler and QPDFArgParser private
Since the functionality of argument parsing has moved into QPDFJob,
these classes no longer need to be public. Their methods still have to
be in the library's binary interface so they can be tested in libtests.
2022-01-31 15:57:45 -05:00
Jay Berkenbilt
0f05cae66a QPDFJob: generate json decl and init file skeletons 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
8a9100f674 QPDFJob: add checkConfiguration to Config 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
0c8e9e5912 QPDFJob: prepare for automatically generated json handlers 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
7eeaf58bb7 More doc tweaks 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
7097f29019 More editorial changes from m-holger + spell check 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
0e909bab8e Improve top-level help information 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
0364024781 Use QPDFUsage exception for cli, json, and QPDFJob errors 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
764feb0f8e TODO note 2022-01-30 13:11:03 -05:00