diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-01-26 15:38:34 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-01-30 19:11:03 +0100 |
commit | b5d41b16b874e322befbd3fa2dde07714f7090a3 (patch) | |
tree | 14b3a08562de59892bb4a1c49be2f66f536b5e7c /include | |
parent | 1cc532dc9121d02d92ac6ce5abb9376b4842c05f (diff) | |
download | qpdf-b5d41b16b874e322befbd3fa2dde07714f7090a3.tar.zst |
QPDFJob: convert under/overlay and rotate
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDFJob.hh | 28 | ||||
-rw-r--r-- | include/qpdf/auto_job_c_main.hh | 1 | ||||
-rw-r--r-- | include/qpdf/auto_job_c_uo.hh | 10 |
3 files changed, 32 insertions, 7 deletions
diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh index 6445665a..9f4a1e70 100644 --- a/include/qpdf/QPDFJob.hh +++ b/include/qpdf/QPDFJob.hh @@ -201,6 +201,22 @@ class QPDFJob Config& config; }; + class UOConfig + { + friend class QPDFJob; + friend class Config; + public: + QPDF_DLL UOConfig& path(char const* parameter); + +# include <qpdf/auto_job_c_uo.hh> + + private: + UOConfig(Config&); + UOConfig(PagesConfig const&) = delete; + + Config& config; + }; + // Configuration is performed by calling methods XXX QXXXQ document class Config { @@ -210,6 +226,8 @@ class QPDFJob std::shared_ptr<CopyAttConfig> copyAttachmentsFrom(); std::shared_ptr<AttConfig> addAttachment(); std::shared_ptr<PagesConfig> pages(); + std::shared_ptr<UOConfig> overlay(); + std::shared_ptr<UOConfig> underlay(); # include <qpdf/auto_job_c_main.hh> @@ -422,16 +440,12 @@ class QPDFJob bool check_requires_password; std::shared_ptr<char> infilename; std::shared_ptr<char> outfilename; - - // Helper functions - void parseRotationParameter(std::string const&); - std::vector<int> parseNumrange(char const* range, int max, - bool throw_error = false); - - // QXXXQ END-PUBLIC private: + // Helper functions + void parseRotationParameter(std::string const&); + std::vector<int> parseNumrange(char const* range, int max); // Basic file processing std::shared_ptr<QPDF> processFile( diff --git a/include/qpdf/auto_job_c_main.hh b/include/qpdf/auto_job_c_main.hh index 09b1ed83..eb0f18be 100644 --- a/include/qpdf/auto_job_c_main.hh +++ b/include/qpdf/auto_job_c_main.hh @@ -65,6 +65,7 @@ QPDF_DLL Config& oiMinWidth(char const* parameter); QPDF_DLL Config& password(char const* parameter); QPDF_DLL Config& passwordFile(char const* parameter); QPDF_DLL Config& removeAttachment(char const* parameter); +QPDF_DLL Config& rotate(char const* parameter); QPDF_DLL Config& showAttachment(char const* parameter); QPDF_DLL Config& showObject(char const* parameter); QPDF_DLL Config& compressStreams(char const* parameter); diff --git a/include/qpdf/auto_job_c_uo.hh b/include/qpdf/auto_job_c_uo.hh new file mode 100644 index 00000000..39b54511 --- /dev/null +++ b/include/qpdf/auto_job_c_uo.hh @@ -0,0 +1,10 @@ +// +// This file is automatically generated by generate_auto_job. +// Edits will be automatically overwritten if the build is +// run in maintainer mode. +// +QPDF_DLL Config& end(); +QPDF_DLL UOConfig& to(char const* parameter); +QPDF_DLL UOConfig& from(char const* parameter); +QPDF_DLL UOConfig& repeat(char const* parameter); +QPDF_DLL UOConfig& password(char const* parameter); |