LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   How do you password protect a .pdf? (https://www.linuxquestions.org/questions/general-10/how-do-you-password-protect-a-pdf-557649/)

cheeseandpenguins 05-30-2007 12:16 AM

How do you password protect a .pdf?
 
also is it possible to copy text (or import text, for example in .txt format) into a pdf and then save it and password protect it...

and print protect? (prevent people from printing the document)

Is there a better way to do this maybe? is there another program that you know of besides adobe that can do all (or some) of this?

:) thanks for any contributions... :)

bsdunix 05-30-2007 08:10 AM

Never used it myself, I found this:

Pdftk - the PDF Toolkit
http://www.accesspdf.com/pdftk/

Quote:

If you're working with PDFs that contain sensitive information, you may want to require a password to read the PDF. If you want to make sure that only certain people can view a PDF, you can apply a password to it with the user_pw option:

pdftk sales_report.pdf output SalesReport.pdf user_pw PROMPT

You will be prompted for a password of up to 32 characters. When someone tries to open the PDF, they will be asked to enter a password.
http://www.linux.com/article.pl?sid=06/04/17/1943230

Dragineez 06-04-2007 11:27 AM

Thanx!
 
You can't imagine how useful that link has been to me. I've needed a tool like that for years. CLI automation of PDF manipulation has now become a regular part of my tool chest. Your link also helped me discover xpdf. Thanks again. One of the reasons I haunt this forum so much.

pwc101 06-04-2007 11:56 AM

For info, print protecting (and I presume password protecting too) pdfs can quite easily be bypassed with some common *nix tools. I'll not put them up here, but just to let you know that what you're print protecting can still be printed.

cheeseandpenguins 06-04-2007 08:27 PM

thanx guys... i'll look into that... ;)

hotty_pwns_u! 06-05-2007 09:21 AM

no it didnt

Cody Morgan 05-06-2015 12:06 PM

PDF password
 
There can't be any spaces between words in the pdf file name. Either rename the pdf file or use an underscore _ in place of a blank space in the file name when typing the name in the Terminal.

John VV 05-07-2015 01:30 AM

Cody Morgan

Hi

but please REFRAIN from Necro posting to a 8 EIGHT YEAR OLD POST

this is from 2007

sundialsvcs 05-07-2015 06:50 AM

... but it's still relevant. People are still using PDFs and imagining that passwords/encryption, Adobe style, actually protects them. :rolleyes: (And even though it really doesn't, "the Suits" tell them to do it.) Still using the same tools, etc. to do it. Still need to know the tricks of how they work.

And, Cody, FYI there is a way to specify a filename that has spaces in it on the command line: enclose the filename in double-quotes. If the name itself contains a double-quote character, prefix that character with a backslash in a C-style "escape." This is true of any filename-reference in a Unix shell.


All times are GMT -5. The time now is 11:59 PM.