https://www.solutelabs.com/blog/how-to-generate-password-protected-pdfs-in-ruby-on-rails-with-wickedpdf