lib/hexapdf/encryption/standard_security_handler.rb in hexapdf-0.19.1 vs lib/hexapdf/encryption/standard_security_handler.rb in hexapdf-0.19.2
- old
+ new
@@ -326,11 +326,10 @@
"Invalid /Filter value for standard security handler")
elsif ![2, 3, 4, 6].include?(dict[:R])
raise(HexaPDF::UnsupportedEncryptionError,
"Invalid /R value for standard security handler")
elsif dict[:R] <= 4 && !document.trailer[:ID].kind_of?(PDFArray)
- raise(HexaPDF::EncryptionError,
- "Document ID for needed for decryption")
+ document.trailer[:ID] = ['', '']
end
@trailer_id_hash = trailer_id_hash
password = prepare_password(password)