This is preferable to passing it directly as a command line argument, which would leak the password into the process table and shell history. -password-file=- instructs qpdf to read the password from standard input.qpdf -decrypt -password-file=-replace-input my_file.pdf Type the PDF password into the terminal, then press Enter followed by Ctrl + D to insert an EOF character. As soon as you run it, qpdf will wait for you to enter the PDF password. Then, with your encrypted PDF file at hand (we'll call it my_file.pdf), run the command below in the terminal. Joe Trellick's answer is excellent, but I would tweak it as follows for improved security.įirst, install qpdf via Homebrew by entering the following into the terminal: brew install qpdf
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |