Score:3

Is knowing the password necessary for removing it from a pdf file?

us flag
Tim

In the replies to how to remove the password from a pdf file, some solutions (e.g. by ghostscript) require no password, while some (e.g. by pdftk) do.

Is knowing the password necessary for removing it from a pdf file? If not, then

  • why do some solutions (e.g. by pdftk) require the password? What are their advantages over those solutions that don't require the password?

  • what is the purpose of setting up a password for a pdf file? Does it try to prevent those without the password from reading and writing the pdf file? Does it prevent those without the password from printing/copying the pdf file to another pdf file without any password, an indirect way to read the original pdf file, and the idea of the pdftk and ghostscript solutions?

terdon avatar
cn flag
I don't think there are solutions that don't require the password. The ghostscript ones will presumably prompt for the password, you just don't pass it on the command line. This is mentioned in the comments.
Tim avatar
us flag
Tim
I remember gs didn't ask anything when I tried it on a password-protected pdf file
terdon avatar
cn flag
But was it password protected for editing or for viewing? If it was for viewing and you could remove the password without knowing the password, then protection would be 100% pointless. Which might be the case, it just seems weird.
Score:1
co flag

One may try to use programs that try to guess the password of the PDF file via bruteforce, e.g. pdfcrack:

sudo apt install pdfcrack

If the password is just for editing the PDF, one can view the PDF file in some PDF viewer e.g. with Chrome's built-in PDF viewer, and print it as a PDF file. The new PDF file won't have any password.

Score:0
gb flag

If the PDF file has a password on it, you will need to know the password to remove it.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.