Jay Berkenbilt
7bc52c5728
set page labels: detect start page < 1 ( fixes #939 )
2024-02-17 16:13:42 -05:00
Jay Berkenbilt
5b2e543089
Honor repeated overlay/underlay
2024-01-11 06:13:57 -05:00
Jay Berkenbilt
34f013c1be
Allow --file and --range with --pages
...
Accept --file and --range as named parameters in additional to
allowing positional arguments. This is in preparation for adding
additional flags.
2024-01-10 16:44:17 -05:00
Jay Berkenbilt
20a134826c
Fix arg parsing check with --collate
...
The check for the number of items was in the wrong place.
2024-01-10 06:49:31 -05:00
Jay Berkenbilt
7cac433e2d
Implement --set-page-labels and supporting API ( fixes #939 )
2024-01-05 17:12:12 -05:00
Jay Berkenbilt
a0e70b370a
Wiring for --set-page-labels: manual (non-bisectable commit)
...
This commit contains only the manual changes. It is separated for
clarity. This commit would not pass CI because it lacks the automated
changes, which appear in the next commit.
2024-01-05 17:10:32 -05:00
Jay Berkenbilt
d8d70ecca2
Support comma-separated numeric values with --collate ( fixes #505 )
2024-01-01 18:57:32 -05:00
Jay Berkenbilt
4ca185fd96
Remove --disable-signatures; incorporate into --remove-restrictions
...
Rather than adding yet another flag that is almost never useful on its
own, just have --remove-restrictions disable digital signatures. The
operations are still separate in the API.
2023-12-24 07:36:07 -05:00
Jay Berkenbilt
909a0b3f3a
Implement --disable-signatures ( fixes #1015 )
2023-12-23 08:50:42 -05:00
Jay Berkenbilt
1f45686843
Handle --encrypt -- without crashing
2023-12-22 20:10:21 -05:00
m-holger
7bc0f1d828
Code tidy - Clang-Tidy rule modernize-use-emplace
2023-06-09 15:42:11 +01:00
m-holger
3c5700c255
Code tidy - reflow comments and strings
2023-06-02 16:00:40 +01:00
Jay Berkenbilt
60965d5f4d
Rerun clang-format
2023-05-21 13:35:09 -04:00
m-holger
4ee6ff0a73
Add new procedure QUtil::read_file_into_string
2023-03-08 21:00:26 +00:00
Jay Berkenbilt
fe11f13d63
Add stub for --remove-restrictions
2023-01-28 13:24:45 -05:00
Jay Berkenbilt
ceeb25f3c8
Rename --report-mem-usage to --report-memory-usage
...
Avd xcsv brvtns.
2022-09-01 17:15:41 -04:00
Jay Berkenbilt
433f1dae19
Add --report-mem-usage option for debugging/testing
2022-08-31 14:47:27 -04:00
Jay Berkenbilt
5f4224f31a
Simplify --json-output
...
Now --json-output just changes defaults. Allow output file with --json.
2022-07-31 16:23:17 -04:00
Jay Berkenbilt
69820847af
Change the output of --json to use "qpdf" instead of "objects"
2022-07-31 15:17:01 -04:00
Jay Berkenbilt
bb96499b61
Update docs and prepare QPDF::writeJSON for changes
...
Add additional parameters that will be needed to call QPDF::writeJSON
in partial mode.
2022-07-31 10:32:55 -04:00
m-holger
073808aa50
Code tidy : replace 0 with nullptr or true
2022-07-26 13:40:13 +01:00
Jay Berkenbilt
e0720eaa78
Use the default logger for other writes to stdout/stderr
...
When there is no context for writing output or error messages, use the
default logger.
2022-06-18 10:38:50 -04:00
Jay Berkenbilt
27a42c16c7
Change default decode level to "none" with --json-output
2022-05-21 17:51:34 -04:00
Jay Berkenbilt
dc8df962d8
Make version default to latest for --json-output (like --json)
2022-05-20 09:16:25 -04:00
Jay Berkenbilt
6f43bf8de3
Major rework -- see long comments
...
* Replace --create-from-json=file with --json-input, which causes the
regular input to be treated as json.
* Eliminate --to-json
* In --json=2, bring back "objects" and eliminate "objectinfo". Stream
data is never present.
* In --json-output=2, write "qpdf-v2" with "objects" and include
stream data.
2022-05-20 09:16:25 -04:00
Jay Berkenbilt
4fe2e06b47
Add --create-from-json and --update-from-json arguments
...
Also add stubs for top-level QPDF methods (createFromJSON,
updateFromJSON)
2022-05-16 13:41:40 -04:00
Jay Berkenbilt
e9390aeaaa
Add --to-json option
2022-05-08 13:45:20 -04:00
Jay Berkenbilt
c76536dd9a
Implement JSON v2 output
2022-05-08 13:45:20 -04:00
Jay Berkenbilt
16f4f94cd9
Prepare code for JSON v2
...
Update getJSON() methods and calls to them
2022-05-07 11:12:01 -04:00
Jay Berkenbilt
b361c5ce19
Add --test-json-schema command-line option
2022-05-07 08:26:31 -04:00
Jay Berkenbilt
6df6260751
Change default --json from 1 to latest
2022-04-16 12:57:33 -04:00
Jay Berkenbilt
ce86307a1a
Fix typo in error message
2022-04-10 16:54:23 -04:00
Jay Berkenbilt
a68703b07e
Replace PointerHolder with std::shared_ptr in library sources only
...
(patrepl and cleanpatch are my own utilities)
patrepl s/PointerHolder/std::shared_ptr/g {include,libqpdf}/qpdf/*.hh
patrepl s/PointerHolder/std::shared_ptr/g libqpdf/*.cc
patrepl s/make_pointer_holder/std::make_shared/g libqpdf/*.cc
patrepl s/make_array_pointer_holder/QUtil::make_shared_array/g libqpdf/*.cc
patrepl s,qpdf/std::shared_ptr,qpdf/PointerHolder, **/*.cc **/*.hh
git restore include/qpdf/PointerHolder.hh
cleanpatch
./format-code
2022-04-09 17:33:29 -04:00
Jay Berkenbilt
12f1eb15ca
Programmatically apply new formatting to code
...
Run this:
for i in **/*.cc **/*.c **/*.h **/*.hh; do
clang-format < $i >| $i.new && mv $i.new $i
done
2022-04-04 08:10:40 -04:00
Jay Berkenbilt
2229e37e88
Add a blank line after the first header included in each source
2022-02-04 16:31:31 -05:00
Jay Berkenbilt
9044a24097
PointerHolder: deprecate getPointer() and getRefcount()
...
Use get() and use_count() instead. Add #define
NO_POINTERHOLDER_DEPRECATION to remove deprecation markers for these
only.
This commit also removes all deprecated PointerHolder API calls from
qpdf's code except in PointerHolder's test suite, which must continue
to test the deprecated APIs.
2022-02-04 13:12:37 -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
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
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
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
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
1355d95d08
QPDFJob: partial mode for initializeFromJson
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
8a9100f674
QPDFJob: add checkConfiguration to Config
2022-01-31 15:57:45 -05:00
Jay Berkenbilt
0364024781
Use QPDFUsage exception for cli, json, and QPDFJob errors
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
c62ab2ee9f
QPDFJob: use pointers instead of references for Config
...
Why? The main methods that create them return smart pointers so that
users can initialize them when needed, which you can't do with
references. Returning pointers instead of references makes for a more
uniform interface.
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
03f3369f35
QPDFJob: use manually named end functions for Config classes
...
Use named functions rather than just end() for clarity.
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
edef2cd330
QPDFJob: make remaining members private
2022-01-30 13:11:03 -05:00