From d31a7b76e7fa6fc6fa31d94394b59f990920d09c Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Tue, 12 Sep 2017 15:48:08 -0400 Subject: Improve message for stream decoding error Tweak the message so that we inform the user that we are mitigating data loss. --- libqpdf/QPDF.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'libqpdf/QPDF.cc') diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc index bea83c98..1ec0d6b6 100644 --- a/libqpdf/QPDF.cc +++ b/libqpdf/QPDF.cc @@ -2382,7 +2382,8 @@ QPDF::pipeStreamData(int objid, int generation, qpdf_offset_t offset, size_t length, QPDFObjectHandle stream_dict, Pipeline* pipeline, - bool suppress_warnings) + bool suppress_warnings, + bool will_retry) { bool success = false; std::vector > to_delete; @@ -2430,6 +2431,13 @@ QPDF::pipeStreamData(int objid, int generation, "error decoding stream data for object " + QUtil::int_to_string(objid) + " " + QUtil::int_to_string(generation) + ": " + e.what())); + if (will_retry) + { + warn(QPDFExc(qpdf_e_damaged_pdf, this->m->file->getName(), + "", this->m->file->getLastOffset(), + "stream will be re-processed without" + " filtering to avoid data loss")); + } } } if (! success) -- cgit v1.2.3-54-g00ecf