Appreciate any help on this. I came across following post at iText tech support faq talking about similar topic. https://itextpdf.com/en/resources/faq/technical-support/itext-7/how-decrypt-pdf-document-owner-password
Seems the following PDF file which they have shared is encrypted and does not allow to overwrite the owner password using PDFBox (2.0.15). http://gitlab.itextsupport.com/itext/sandbox/raw/master/resources/pdfs/hello_encrypted2.pdf How does this works and are there any similar implementation in PDFBox. Thanks On 2019/05/22 01:28:36, RJC 2009 <rjc2...@gmail.com> wrote: > Thanks Tilman Hausherr and Marc Kaufman for your time & help. > > I came across following post at iText tech support faq talking about > similar topic. > https://itextpdf.com/en/resources/faq/technical-support/itext-7/how-decrypt-pdf-document-owner-password > > Seems the following pdf file which they have shared is encrypted and does > not allow to overwrite the owner password using PDFBox (2.0.15). > http://gitlab.itextsupport.com/itext/sandbox/raw/master/resources/pdfs/hello_encrypted2.pdf > > I'm just wondering how does this works and are there any similar > implementation in PDFBox. > > On Wed, May 22, 2019 at 7:45 AM Marc Kaufman <m...@eeph.com> wrote: > > > Which is, of course, a violation of the "agreement" between PDF and > > Readers (ignored by everyone, it seems, except Adobe). In > > Acrobat/Reader, you need to open with the Owner password in order to > > change permissions. Opening with the User password should honor > > permissions and not allow changing of permissions. > > > > Marc > > > > On 5/21/2019 9:42 AM, Tilman Hausherr wrote: > > > Am 17.05.2019 um 09:47 schrieb RJC 2009: > > >> Here is my test program which is trying to disable the printing > > >> option and > > >> protect the document with an owner password. > > >> > > >> However, if I use the resultant PDF and run the program again with a > > >> DIFFERENT owner password then it ENABLE the printing option. > > >> > > >> > > >> > > >> Basically I need to disable the printing option in PDF with an owner > > >> password and the printing option cannot be enabled back without using > > >> the > > >> original owner password. > > > > > > > > > I should have read the text more carefully (and continue reading after > > > "2.0.5"). This is by design. When you open with the user password then > > > the file is decrypted and can be manipulated, reencrypted, everything. > > > The owner password is just an extra so that a software can decide that > > > you're the owner. That is why there are so many tools on the internet > > > that allow to change the permissions of PDF files. > > > > > > Read also this: > > > > > > https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt > > > > > > > > > Tilman > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org > > > For additional commands, e-mail: users-h...@pdfbox.apache.org > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org > > For additional commands, e-mail: users-h...@pdfbox.apache.org > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org For additional commands, e-mail: users-h...@pdfbox.apache.org