diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-01-26 01:01:10 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-01-30 19:11:03 +0100 |
commit | 41c5af8f2664cef36d4a1253ba5251603a937605 (patch) | |
tree | 60109db66fc61d98eb833eef252ec7e9ac54fbef /include | |
parent | 9373881cca0c781c66b2b50b962bdbc26364abe5 (diff) | |
download | qpdf-41c5af8f2664cef36d4a1253ba5251603a937605.tar.zst |
QPDFJob: convert pages
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDFJob.hh | 41 | ||||
-rw-r--r-- | include/qpdf/auto_job_c_pages.hh | 6 |
2 files changed, 36 insertions, 11 deletions
diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh index 853f7969..5d29e34e 100644 --- a/include/qpdf/QPDFJob.hh +++ b/include/qpdf/QPDFJob.hh @@ -135,6 +135,17 @@ class QPDFJob bool replace; }; + struct PageSpec + { + PageSpec(std::string const& filename, + char const* password, + std::string const& range); + + std::string filename; + std::shared_ptr<char> password; + std::string range; + }; + public: class Config; @@ -172,6 +183,24 @@ class QPDFJob CopyAttachmentFrom caf; }; + class PagesConfig + { + friend class QPDFJob; + friend class Config; + public: + PagesConfig& pageSpec(std::string const& filename, + char const* password, + std::string const& range); + +# include <qpdf/auto_job_c_pages.hh> + + private: + PagesConfig(Config&); + PagesConfig(PagesConfig const&) = delete; + + Config& config; + }; + // Configuration is performed by calling methods XXX QXXXQ document class Config { @@ -180,6 +209,7 @@ class QPDFJob QPDF_DLL std::shared_ptr<CopyAttConfig> copyAttachmentsFrom(); std::shared_ptr<AttConfig> addAttachment(); + std::shared_ptr<PagesConfig> pages(); # include <qpdf/auto_job_c_main.hh> @@ -243,17 +273,6 @@ class QPDFJob static void parse_object_id( std::string const& objspec, bool& trailer, int& obj, int& gen); - struct PageSpec - { - PageSpec(std::string const& filename, - char const* password, - std::string const& range); - - std::string filename; - std::shared_ptr<char> password; - std::string range; - }; - struct RotationSpec { RotationSpec(int angle = 0, bool relative = false) : diff --git a/include/qpdf/auto_job_c_pages.hh b/include/qpdf/auto_job_c_pages.hh new file mode 100644 index 00000000..0d81c336 --- /dev/null +++ b/include/qpdf/auto_job_c_pages.hh @@ -0,0 +1,6 @@ +// +// 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(); |