Satish Chandu
Satish Chandu

Reputation: 11

How to set password protection for PDF files generated with PDFKit

I tried providing a password option like PDFKit.new(:password => "foo") but it won't set any password protection.

I want to set a password protection to PDFs by using PDFKit. How can i do this?

Upvotes: 0

Views: 1307

Answers (1)

Kostas Rousis
Kostas Rousis

Reputation: 6068

PDFKit uses wkhtmltopdf in the background which does not support generating password protected PDF files.

If the PDF file contains sensitive data you might want to try encrypting the PDF file after generation.

Upvotes: 1

Related Questions