Tech, Gadgets, Photography, Social Media and Poor Spelling
We can user pdftk tool to create a password locked pdf file i.e. to open the pdf file we need to open the supply a password
The options that have to be passed to pdftk are
pdftk <input_pdf_file> output <output_pdf_file> encrypt40bit user_pw <Password_for_the_file>
Let us say we have a file temp.pdf and we want to have the password “hello” for opening the file and we will call the new file by the name temp_passwd.pdf
pdftk temp.pdf output temp_passwd.pdf encrypt_40bit user_pw “hello”
Now if we try to open the file temp_passwd.pdf we will be prompted for a password and the file will open only if we pass the password “hello”. In the command we also use encrypt_128bit instead of encrypt_40bit.