It works for me using the last iText version. In both cases only printing is allowed. I tested with Acrobat 5.05.
Best Regards, Paulo Soares > -----Original Message----- > From: Hibbard, Mark [SMTP:[EMAIL PROTECTED] > Sent: Tuesday, November 04, 2003 11:15 > To: 'Paulo Soares'; Hibbard, Mark; > '[EMAIL PROTECTED]' > Subject: RE: [iText-questions] Security on document > > The Encryption settings only appear to work IF a user password is set. > If I don't set a user password, then nothing gets set (i.e. only allow > printing or set a security password) > > Sounds like a bug to me? > > This works (sets user password, security password, and only allows > printing) > PdfEncryptor.encrypt(finalpdfReader, encryptedbytes,false,"user", > "CSFBSecurity", PdfWriter.AllowPrinting); > This does NOT work (doesn't set security password and default security > permissions - i.e. allow printing and selecting text) > PdfEncryptor.encrypt(finalpdfReader, encryptedbytes,false,null, > "CSFBSecurity", PdfWriter.AllowPrinting); > > -----Original Message----- > From: Paulo Soares [mailto:[EMAIL PROTECTED] > Sent: 03 November 2003 17:25 > To: 'Hibbard, Mark'; '[EMAIL PROTECTED]' > Subject: RE: [iText-questions] Security on document > > > > > > -----Original Message----- > > From: Hibbard, Mark [SMTP:[EMAIL PROTECTED] > > Sent: Monday, November 03, 2003 17:20 > > To: 'Paulo Soares'; '[EMAIL PROTECTED]' > > Subject: RE: [iText-questions] Security on document > > > > I've used the following method from the javadocs: > > > > public static void encrypt(PdfReader reader, > > OutputStream os, > > boolean strength, > > String userPassword, > > String ownerPassword, > > int permissions) > > throws DocumentException, > > IOException > > > > What exactly is the ownerPassword? - what does this do? (it doesn't seem > > to do > > anything?) > > > It allows the changing of the security settings in Acrobat. > > > And if I set permissions to be 10000000 i.e. only allow printing - it > > still > > allows Selecting Text and Graphics??? > > > You must use the PdfWriter.AllowPrinting constant. > > Best Regards, > Paulo Soares > > > -----Original Message----- > > From: Paulo Soares [mailto:[EMAIL PROTECTED] > > Sent: 03 November 2003 17:06 > > To: 'Hibbard, Mark'; '[EMAIL PROTECTED]' > > Subject: RE: [iText-questions] Security on document > > > > > > Anything wrong with the javadocs? > > > > Best Regards, > > Paulo Soares > > > > > -----Original Message----- > > > From: Hibbard, Mark [SMTP:[EMAIL PROTECTED] > > > Sent: Monday, November 03, 2003 11:34 > > > To: '[EMAIL PROTECTED]' > > > Subject: [iText-questions] Security on document > > > > > > I need to be able to set up documents in PDF with the following > security > > > permissions: > > > > > > * A password required to change security options > > > * Do not allow - > > > Changing the document > > > Selecting text and graphics > > > Adding or changing annotations and form fields > > > > > > > > > I've tried using iText in the following way: > > > PdfEncryptor.encrypt(finalpdfReader, encryptedBbytes,false,null, > > "owner", > > > 1000000); > > > > > > but this doesn't achieve what i require. It doesn't set a security > > > password, > > > and doesn't prevent selecting text and graphics. > > > > > > Can anyone help or advise how I can do this? > > > > > > Cheers > > > > > > Mark > > > > > > > > > ========================================================================== > > > ==== > > > This message is for the named person's use only. It may contain > > sensitive > > > and > > > private proprietary or legally privileged information. No > > confidentiality > > > or > > > privilege is waived or lost by any mistransmission. If you are not the > > > intended recipient, please immediately delete it and all copies of it > > from > > > your system, destroy any hard copies of it and notify the sender. You > > must > > > not, directly or indirectly, use, disclose, distribute, print, or copy > > any > > > part of this message if you are not the intended recipient. CREDIT > > SUISSE > > > GROUP and each legal entity in the CREDIT SUISSE FIRST BOSTON or > CREDIT > > > SUISSE > > > ASSET MANAGEMENT business units of CREDIT SUISSE FIRST BOSTON reserve > > the > > > right to monitor all e-mail communications through its networks. Any > > views > > > expressed in this message are those of the individual sender, except > > where > > > the > > > message states otherwise and the sender is authorized to state them to > > be > > > the > > > views of any such entity. > > > Unless otherwise stated, any pricing information given in this message > > is > > > indicative only, is subject to change and does not constitute an > offer > > to > > > deal at any price quoted. Any reference to the terms of executed > > > transactions > > > should be treated as preliminary only and subject to our formal > written > > > confirmation. > > > > > > ========================================================================== > > > ==== > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: SF.net Giveback Program. > > > Does SourceForge.net help you be more productive? Does it > > > help you create better code? SHARE THE LOVE, and help us help > > > YOU! Click Here: http://sourceforge.net/donate/ > > > _______________________________________________ > > > iText-questions mailing list > > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > > ========================================================================== > > ==== > > This message is for the named person's use only. It may contain > sensitive > > and > > private proprietary or legally privileged information. No > confidentiality > > or > > privilege is waived or lost by any mistransmission. If you are not the > > intended recipient, please immediately delete it and all copies of it > from > > your system, destroy any hard copies of it and notify the sender. You > must > > not, directly or indirectly, use, disclose, distribute, print, or copy > any > > part of this message if you are not the intended recipient. CREDIT > SUISSE > > GROUP and each legal entity in the CREDIT SUISSE FIRST BOSTON or CREDIT > > SUISSE > > ASSET MANAGEMENT business units of CREDIT SUISSE FIRST BOSTON reserve > the > > right to monitor all e-mail communications through its networks. Any > views > > expressed in this message are those of the individual sender, except > where > > the > > message states otherwise and the sender is authorized to state them to > be > > the > > views of any such entity. > > Unless otherwise stated, any pricing information given in this message > is > > indicative only, is subject to change and does not constitute an offer > to > > deal at any price quoted. Any reference to the terms of executed > > transactions > > should be treated as preliminary only and subject to our formal written > > confirmation. > > > ========================================================================== > > ==== > > ========================================================================== > ==== > This message is for the named person's use only. It may contain sensitive > and > private proprietary or legally privileged information. No confidentiality > or > privilege is waived or lost by any mistransmission. If you are not the > intended recipient, please immediately delete it and all copies of it from > your system, destroy any hard copies of it and notify the sender. You must > not, directly or indirectly, use, disclose, distribute, print, or copy any > part of this message if you are not the intended recipient. CREDIT SUISSE > GROUP and each legal entity in the CREDIT SUISSE FIRST BOSTON or CREDIT > SUISSE > ASSET MANAGEMENT business units of CREDIT SUISSE FIRST BOSTON reserve the > right to monitor all e-mail communications through its networks. Any views > expressed in this message are those of the individual sender, except where > the > message states otherwise and the sender is authorized to state them to be > the > views of any such entity. > Unless otherwise stated, any pricing information given in this message is > indicative only, is subject to change and does not constitute an offer to > deal at any price quoted. Any reference to the terms of executed > transactions > should be treated as preliminary only and subject to our formal written > confirmation. > ========================================================================== > ==== ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
