Created
February 23, 2021 09:19
-
-
Save prateekrajgautam/cb13cf006e252f44edf81e2bdb82db25 to your computer and use it in GitHub Desktop.
Encrypt pdf using pdftk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
read -p 'Input file name : ' input | |
read -p 'Input file name : ' output | |
read -s -p 'Input Secured Password : ' pass | |
echo "" | |
echo "trying to fine file in current folder" | |
pdftk ./$input input_pw encrypt output ./$output.pdf user_pw prateek owner_pw $pass encrypt_128bit compress flatten | |
echo "" | |
echo "trying to find file in absolute path" | |
pdftk "$input" input_pw encrypt output "$output.pdf" user_pw prateek owner_pw $pass encrypt_128bit compress flatten | |
echo "" | |
read -p 'press enter to: ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment