From 8dcf6da2590633e00fe9d0334692d5ca482e740a Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Thu, 6 Jan 2022 09:34:49 -0500 Subject: QPDFJob: remove non-check from doFinalChecks --- libqpdf/QPDFJob.cc | 3 ++- libqpdf/QPDFJob_argv.cc | 7 +------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/libqpdf/QPDFJob.cc b/libqpdf/QPDFJob.cc index a65db073..a2bf668e 100644 --- a/libqpdf/QPDFJob.cc +++ b/libqpdf/QPDFJob.cc @@ -2428,7 +2428,8 @@ QPDFJob::handleTransformations(QPDF& pdf) afdh = new QPDFAcroFormDocumentHelper(pdf); } }; - if (o.externalize_inline_images) + if (o.externalize_inline_images || + (o.optimize_images && (! o.keep_inline_images))) { std::vector pages = dh.getAllPages(); for (std::vector::iterator iter = pages.begin(); diff --git a/libqpdf/QPDFJob_argv.cc b/libqpdf/QPDFJob_argv.cc index 421099d1..aa2c8bf4 100644 --- a/libqpdf/QPDFJob_argv.cc +++ b/libqpdf/QPDFJob_argv.cc @@ -2320,11 +2320,6 @@ ArgParser::doFinalChecks() { usage("no output file may be given for this option"); } - if (o.optimize_images && (! o.keep_inline_images)) - { - // QXXXQ this is not a check and doesn't belong here - o.externalize_inline_images = true; - } if (o.check_requires_password && o.check_is_encrypted) { usage("--requires-password and --is-encrypted may not be given" @@ -2357,7 +2352,7 @@ ArgParser::doFinalChecks() usage("--split-pages may not be used when" " writing to standard output"); } - if (o.verbose) // QXXXQ + if (o.verbose) { usage("--verbose may not be used when" " writing to standard output"); -- cgit v1.2.3-54-g00ecf