Closed newSirawit closed 7 months ago
You need to use doc.encrypt(**encryption_options)
since the method doesn't expect a single hash as argument but a number of keyword arguments, see https://hexapdf.gettalong.org/documentation/api/HexaPDF/Document/index.html#method-i-encrypt.
Also, the type: :standard_v2
is a not supported keyword argument for the #encrypt
method.
i try to encryption pdf file before open by using encrypt but got "`encrypt': wrong number of arguments (given 1, expected 0) (ArgumentError)". what is i missing pls help.
this is my code :
" def test_encryption doc = HexaPDF::Document.new