Wednesday, December 4, 2024

Creating liberating content

This Is the Default...

Debian GNU/Linux 13 “Trixie” default artwork has been revealed featuring organic forms inspired...

Nitrux 3.8 Released with...

Nitrux 3.8 distribution is now available for download powered by Linux kernel 6.12...

Qt Creator 15 Open-Source...

Qt Creator 15 open-source IDE (Integrated Development Environment) is now available for download...

9to5Linux Weekly Roundup: December...

The 9to5Linux Weekly Roundup for December 1st, 2024, brings news about Linux 6.13...

How to Remove Password from PDF Files in Linux

How to Remove Password from PDF Files in Linux

The other day, I received a PDF file which was password protected. I also received the password of the file.

Now, when I open this PDF file, it asks to enter the password first. The default document viewer gives the option to save the password to avoid entering it again and again. However, the PDF will still be required if the file is to be read on some other device or if I want to transfer the file to my Kindle.

Thankfully, it is fairly easy to 'remove' password from a password protected PDF file. Actually, you create a new password-less version of the file.

I'll share two methods for getting this task done:

  • GUI method that uses Evince document viewer
  • CLI method that uses qpdf CLI tool
🚧
This tutorial is NOT about cracking a password protected PDF file. It works when you have the password of the PDF file but do not want to enter it every time you open it.

GUI Method: Remove password from PDF using Evince document reader

Ubuntu and many other distributions come with the Evince document reader app installed. It is usually displayed as 'Document Viewer' in the GNOME desktop environment.

If you do not have it installed, please install it using the package manager or software center of your distribution.

Open the PDF file in the Document Viewer. Enter the password of the document when asked.

How to Remove Password from PDF Files in Linux

The PDF document will be open for reading now. However, you have a different motive here.

Click on the hamburger menu in the top-right corner and click the print icon. You could also use the Ctrl+P keyboard shortcut.

How to Remove Password from PDF Files in Linux

It will give you the option to print the document. What you have to do here is to select 'Print to file' option. This option is also available as 'Print to PDF' at times. This will save a copy of the document as PDF.

You may also choose the location and name of the unlocked output file.

How to Remove Password from PDF Files in Linux

It will show a notification that it is 'printing the file' but it is actually creating the new PDF file.

How to Remove Password from PDF Files in Linux
Unlocked PDF file being created but you'll see it as Printing Job

Once the process is done, you can go to the output PDF file, double click on it to open it and enjoy the PDF file without password.

📋
I think that the default PDF document viewer apps in many other desktop environments are also capable of this. You are welcome to explore it in your choice of desktop environments.

CLI Method: Remove password from PDF file using qpdf command

You can use the qpdf utility in the terminal to remove the password from the PDF file (if you know it). You may have to install it first.

The syntax is quite simple:

qpdf --password=PDF-PASSWORD --decrypt input_pdf output_pdf

Here, you have to replace PDF-PASSWORD with the password of the PDF file, input_pdf with the password-protected PDF file's name and path (if required). Similarly, you should replace output_pdf with an appropriate PDF file name.

When I tested this command, its output showed me some warnings but the resulted PDF file worked just fine.

How to Remove Password from PDF Files in Linux

There are many other command line utilities that can do the same job. For example, you can use the pdftk tool:

pdftk input_pdf output output_pdf user_pw PDF-PASSWORD

Conclusion

As you can see, it is fairly easy to remove the password from PDF files. Of course, it won't work if you do not know the password of the file in the first place. This is more for removing the annoyance of entering passwords again and again.

I hope you liked this quick tip. Let me know in the comments if you have any questions.

from It’s FOSS https://ift.tt/8myRdsb

Get notified whenever we post something new!

spot_img

Create a website from scratch

Just drag and drop elements in a page to get started with Newspaper Theme.

Continue reading

This Is the Default Theme of Debian GNU/Linux 13 “Trixie”

Debian GNU/Linux 13 “Trixie” default artwork has been revealed featuring organic forms inspired by Trixie's frill, with an obvious debt to futurePrototype. The post This Is the Default Theme of Debian GNU/Linux 13 “Trixie” appeared first on 9to5Linux - do...

Nitrux 3.8 Released with Linux Kernel 6.12, Better Support for NVIDIA Users

Nitrux 3.8 distribution is now available for download powered by Linux kernel 6.12 and featuring various new and updated components. Here's what's new! The post Nitrux 3.8 Released with Linux Kernel 6.12, Better Support for NVIDIA Users appeared first on...

Qt Creator 15 Open-Source IDE Released with Axivion Support, New Themes

Qt Creator 15 open-source IDE (Integrated Development Environment) is now available for download with Axivion support, new themes, and more. Here's what's new! The post Qt Creator 15 Open-Source IDE Released with Axivion Support, New Themes appeared first on 9to5Linux...

Enjoy exclusive access to all of our content

Get an online subscription and you can unlock any article you come across.