aboutsummaryrefslogtreecommitdiffstats
path: root/qpdf/qpdf.cc
diff options
context:
space:
mode:
Diffstat (limited to 'qpdf/qpdf.cc')
-rw-r--r--qpdf/qpdf.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/qpdf/qpdf.cc b/qpdf/qpdf.cc
index 70a5746a..cc02e1fd 100644
--- a/qpdf/qpdf.cc
+++ b/qpdf/qpdf.cc
@@ -5569,7 +5569,7 @@ static void set_writer_options(QPDF& pdf, Options& o, QPDFWriter& w)
}
}
-static void do_split_pages(QPDF& pdf, Options& o)
+static void do_split_pages(QPDF& pdf, Options& o, bool& warnings)
{
// Generate output file pattern
std::string before;
@@ -5653,6 +5653,10 @@ static void do_split_pages(QPDF& pdf, Options& o)
{
std::cout << whoami << ": wrote file " << outfile << std::endl;
}
+ if (outpdf.anyWarnings())
+ {
+ warnings = true;
+ }
}
}
@@ -5794,6 +5798,7 @@ int realmain(int argc, char* argv[])
}
handle_under_overlay(pdf, o);
handle_transformations(pdf, o);
+ bool split_warnings = false;
if ((o.outfilename == 0) && (! o.replace_input))
{
@@ -5801,13 +5806,13 @@ int realmain(int argc, char* argv[])
}
else if (o.split_pages)
{
- do_split_pages(pdf, o);
+ do_split_pages(pdf, o, split_warnings);
}
else
{
write_outfile(pdf, o);
}
- if (! pdf.getWarnings().empty())
+ if ((! pdf.getWarnings().empty()) || split_warnings)
{
if (! o.suppress_warnings)
{