Hi, Bruno,

Thank you! Sorry! Please forgive me I am a kind of
slow here. I have checked PDF Spec. If I understand
what you said right, 
(1) If I know owner password, of course, I can open
and manipulate the PDF with iText. I understand this.
(2) If I have a pdf file which has no owner password,
but has user password, I can still open and manipulate
it with iText even though I do not know the user
password, because user-password is for end-user, it is
not for program like iText. Does this mean that in
iText I can ignore the user-password? even remove the
user-password protection?

Thank you!

Cheng

--- bruno <[EMAIL PROTECTED]> wrote:

> Zhi Ren wrote:
> 
> >Hi, Bruno,
> >
> >Thanks!
> >
> >So, if isEncrypted() return true, it is
> user-password
> >protected.
> >
> It's not that simple.
> Please read the PDF Reference on user/owner
> passwords.
> 
> > But, in iText there are only constructors
> >which take ownerPassword as input like:
> >PdfReader(String filename, byte[] ownerPassword).
> >
> Indeed: a user password is the password the end-user
> needs
> to view the PDF.
> An owner password is what a program needs to
> manipulate
> the document.
> If you understand the difference, you understand why
> there
> is no method that takes the user password.
> 
> > So
> >my question is:
> >
> >How to open a user-password-protected pdf file in
> >iText? 
> >  
> >
> That's the whole idea of protection: you need the
> owner
> password to do this. Otherwise you could remove the
> permissions by entering the user password only. What
> would then be the point of having an owner password?
> 
> >My other question is: in iText how do we know if
> there
> >is a owner-password in a pdf file?
> >
> >My understand is: even there is a owner-password,
> we
> >can still open and edit (do whatever we want on) a
> pdf
> >file with iText, am I right?
> >
> If you know the owner password, you use it to in
> PdfReader;
> you don't need the user password if you have the
> owner password.
> 
> Anyway: you should read what the PDF Reference says
> on passwords.
> br,
> Bruno
> 
> 
>
-------------------------------------------------------
> Using Tomcat but need to do more? Need to support
> web services, security?
> Get stuff done quickly with pre-integrated
> technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1
> based on Apache Geronimo
>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> iText-questions mailing list
> [email protected]
>
https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to