From cc5485dac1f224f856ce48781278b357f61f74bd Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Tue, 1 Feb 2022 07:18:23 -0500 Subject: QPDFJob: documentation --- examples/pdf-job.cc | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 examples/pdf-job.cc (limited to 'examples/pdf-job.cc') diff --git a/examples/pdf-job.cc b/examples/pdf-job.cc deleted file mode 100644 index 41ee8603..00000000 --- a/examples/pdf-job.cc +++ /dev/null @@ -1,49 +0,0 @@ -#include -#include - -#include -#include - -// QXXXQ describe - -static char const* whoami = 0; - -#if 0 // QXXXQ -static void usage(std::string const& msg) -{ - std::cerr << "Usage: " << whoami << " QXXXQ" << std::endl; - exit(2); -} -#endif - -int main(int argc, char* argv[]) -{ - whoami = QUtil::getWhoami(argv[0]); - - // For libtool's sake.... - if (strncmp(whoami, "lt-", 3) == 0) - { - whoami += 3; - } - - try - { - QPDFJob j; - j.config() - ->inputFile("/tmp/1.pdf") - ->outputFile("/tmp/2.pdf") - ->pages() - ->pageSpec(".", "1-z") - ->endPages() - ->qdf() - ->checkConfiguration(); - j.run(); - } - catch (std::exception& e) - { - // QXXXQ catch usage, configerror, whatever we end up with separately - std::cerr << "exception: " << e.what() << std::endl; - return 2; - } - return 0; -} -- cgit v1.2.3-70-g09d2