Tuesday, January 7, 2025

Creating liberating content

Budgie 10.10 Desktop Will...

Budgie 10.10 desktop environment is slated for release in Q1 2025 as a...

How to Install Linux...

A quick tutorial on how to install the latest and greatest Linux 6.12...

Mozilla Firefox 134 Is...

Mozilla Firefox 134 open-source web browser is now available for download with support...

9to5Linux Weekly Roundup: January...

The 9to5Linux Weekly Roundup for January 5th, 2025, brings news about Debian 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

Budgie 10.10 Desktop Will Be Wayland-Only as Work Continues on Budgie 11

Budgie 10.10 desktop environment is slated for release in Q1 2025 as a Wayland-only release defaulting to the Labwc compositor. The post Budgie 10.10 Desktop Will Be Wayland-Only as Work Continues on Budgie 11 appeared first on 9to5Linux - do...

How to Install Linux Kernel 6.12 LTS on Ubuntu 24.04 LTS and Ubuntu 24.10

A quick tutorial on how to install the latest and greatest Linux 6.12 LTS kernel series on the Ubuntu 24.04 LTS (Noble Numbat) and Ubuntu 24.10 (Oracular Oriole) distributions. The post How to Install Linux Kernel 6.12 LTS on Ubuntu...

Mozilla Firefox 134 Is Out with Support for Touchpad Hold Gestures on Linux

Mozilla Firefox 134 open-source web browser is now available for download with support for touchpad hold gestures on Linux and other changes. Here's what's new! The post Mozilla Firefox 134 Is Out with Support for Touchpad Hold Gestures on Linux...

Enjoy exclusive access to all of our content

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