TvT wrote:
> Lets say i am opening the PdfReader with a password but i don't know
> whether its the user or the owner password (because e.g. the user
> typed it in) Is there a way to find that out?

You can do this with the method isOpenedWithFullPermissions()
If the document is encrypted, it returns true if the owner password
was entered, and false if the user password was used.
If the document isn't encrypted, it returns true.

> If i am opening a document with the user password but want to
> change something (later). In acrobat i can then supply the owner
> password and change it.
> Is that possible with iText?

You need to create another instance of PdfReader with the owner 
password; you can't reuse the same reader instance.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to