Can wicked_pdf or wkhtmltopdf generate a protected

2019-09-03 19:54发布

问题:

So, I have wicked_pdf up and running, now I am wondering if I can password protect the pdf being generated so it is not easily editable. Is this possible? Perhaps a better question is can wkhtmltopdf generate a protected pdf?

If not, is there a great rails pdf gem or similar that can take an existing pdf and protect it?

Thanks!

回答1:

Let me check the usage for wkhtmltopdf (v0.10.0 rc2).

Nope, at least not according to it's usage dump. And wicked_pdf just wraps wkhtmltopdf, so you're out of luck.

There are any number of OSS PDF projects floating around out there that could encrypt your PDF output in a second pass.