You can use the qpdf command-line tool to remove a password from a PDF file in Linux. Here’s how to do it:
- Install the
qpdfpackage if it’s not already installed on your system. You can do this using the package manager for your Linux distribution. For example, in Ubuntu or Debian, you can run:sudo apt-get install qpdf
- Open a terminal window and navigate to the directory where the PDF file is located.
- Type the following command to remove the password from the PDF file:
qpdf --password=<password> --decrypt input.pdf output.pdf
Replace
<password>with the password required to open the PDF file.input.pdfis the name of the original PDF file, andoutput.pdfis the name of the new file that will be created without the password.If the PDF file doesn’t have a password, you can omit the
--passwordoption. - When the command completes, you should see a new PDF file without a password in the same directory.
Note that the qpdf command-line tool can also be used to encrypt a PDF file with a password, as well as to manipulate other aspects of PDF files. For more information, you can consult the qpdf manual page by running man qpdf in the terminal.