Op 31/03/2011 11:17, Cristina Moura schreef:
Hi!
I need to make my PDF Secured with the permission "restrict editing
and printing the document" that exists in Abobe.
I try this:
pdfStamper.SetEncryption(password, password, PdfWriter.AllowPrinting,
PdfWriter.STANDARD_ENCRYPTION_128)
but this makes all document protect with a password. To open the
generated PDF I need the final usern must know the password.
This is not what I need. I need the user to be able to view the
document and printing, but no editing/modified is allow.
I assume you didn't read the documentation.
Why are you using the same variable "password" twice?
It doesn't make sense for a PDF to have the same password for the user
and the owner of the document, does it?
If you want to make sure the end user doesn't have to enter a password,
you shouldn't provide a user password.
You should only provide an owner password (and use null for the user
password).
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php