From d501e1c0d43eb5bf9fbbc39ac5e9ed5c5842b4ed Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Tue, 8 Feb 2022 13:38:03 -0500 Subject: Only update output version from files used as input If we're opening a PDF file to copy its encryption information or attachments, its version doesn't need to influence the output version. --- include/qpdf/QPDFJob.hh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh index 9524fdbf..acaa956b 100644 --- a/include/qpdf/QPDFJob.hh +++ b/include/qpdf/QPDFJob.hh @@ -444,15 +444,17 @@ class QPDFJob // Basic file processing std::shared_ptr processFile( - char const* filename, char const* password); + char const* filename, char const* password, + bool used_for_input); std::shared_ptr processInputSource( - PointerHolder is, char const* password); + PointerHolder is, char const* password, + bool used_for_input); std::shared_ptr doProcess( std::function fn, - char const* password, bool empty); + char const* password, bool empty, bool used_for_input); std::shared_ptr doProcessOnce( std::function fn, - char const* password, bool empty); + char const* password, bool empty, bool used_for_input); // Transformations void setQPDFOptions(QPDF& pdf); -- cgit v1.2.3-54-g00ecf