PDF API for password encryption?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Selling an e-book in pdf-format, I want to secure the pdf with a
password encryption. In Adobe you can do that by hand through "Secure-
Password Encrypt", but I want to do this automatically by writing a
perl-script. I discovered a PDF::API2 module, but I can't discover if
that module also offers a password encrypt-functionality.

Is there anybody having experience with this module or having an
alternative for PDF::API2 that can do the job?

Thanks a lot!


Re: PDF API for password encryption?

Quoted text here. Click to load it

There is CAM::PDF, unfortunately this module has the mind-numbing
security hole that the owner password and user password must be
identical in order to correctly output an encrypted PDF. So, someone
with the user password could completely remove the encryption just by
loading up the PDF in Adobe Acrobat.

If there is a secure implementation that allows the the passwords to
be different, I'd sure like to know about it.

Re: PDF API for password encryption?


Quoted text here. Click to load it

You may try the pdfcrypt utility,
<http://www.sanface.com/pdfcrypt.html , which claims to be written in
"PERL" (this is not a good sign) and although it is not free software,
I suppose it is not prohibited to look at its source. It simply says:
"You can't modify directly it."

->(map substr
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,

Site Timeline