lib/hexapdf/cli/command.rb in hexapdf-0.40.0 vs lib/hexapdf/cli/command.rb in hexapdf-0.41.0

- old
+ new

@@ -132,9 +132,20 @@ $stderr.puts "Corrected parsing problem: #{msg}" end false end end + hash[:config]['encryption.on_decryption_error'] = + if command_parser.strict + proc { true } + else + proc do |obj, msg| + if command_parser.verbosity_info? + $stderr.puts "Ignored decryption problem for object (#{ob.oid},#{obj.gen}): #{msg}" + end + false + end + end hash end # Writes the document to the given file or does nothing if +out_file+ is +nil+. def write_document(doc, out_file, incremental: false)