Encryption is not meant to work with PdfCopy, probably should. It only works
with PdfStamper and PdfWriter.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Hibbard, Mark [SMTP:[EMAIL PROTECTED]
> Sent: Tuesday, November 04, 2003 13:51
> To:   'Paulo Soares'; Hibbard, Mark;
> '[EMAIL PROTECTED]'
> Subject:      RE: [iText-questions] Security on document
> 
> So please explain why when I set the user password - it clearly works
> (i.e. it
> is going thru the PdfEncrpytor.encrypt code & sets passwords and correct
> permissions). If i don't set a user password then it doesn't apply any
> encryption.
> 
> I am using PdfCopy, and have tried setting 
> pdfCopy.setEncryption(false,"","Security", PdfWriter.AllowPrinting)
> 
> before 
> document.open()
> 
> And again - this DOES NOT work, but will do if I set a user password.
> 
> -----Original Message-----
> From: Paulo Soares [mailto:[EMAIL PROTECTED]
> Sent: 04 November 2003 12:11
> To: 'Hibbard, Mark'; '[EMAIL PROTECTED]'
> Subject: RE: [iText-questions] Security on document
> 
> 
> I don't know what you are doing over there but the document you sent has
> no
> encryption whatsoever and I'm very sure that it didn't pass through
> PdfEncryptor.encrypt(). PdfEncryptor works on existing pdfs. If you are
> creating a new pdf use PdfWriter.setEncryption() before Document.open().
> 
> Best Regards,
> Paulo Soares
> 
> > -----Original Message-----
> > From:       Hibbard, Mark [SMTP:[EMAIL PROTECTED]
> > Sent:       Tuesday, November 04, 2003 11:36
> > To: 'Paulo Soares'; Hibbard, Mark;
> > '[EMAIL PROTECTED]'
> > Subject:    RE: [iText-questions] Security on document
> > 
> > Ahh I'm using acrobat 4 - maybe thats the issue, i'll try and test on 5.
> > 
> > Document attached was set with allow printing only and a security
> password
> > -
> > but with acrobat 4 i see allow select of text and no security password
> > 
> > -----Original Message-----
> > From: Paulo Soares [mailto:[EMAIL PROTECTED]
> > Sent: 04 November 2003 11:30
> > To: 'Hibbard, Mark'; '[EMAIL PROTECTED]'
> > Subject: RE: [iText-questions] Security on document
> > 
> > 
> > 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 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.
> >
> ==========================================================================
> > ==== << File: test.pdf >> 
> 
> ==========================================================================
> ====
> 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

Reply via email to