That's brilliant - thanks.

 

Kind regards

William

William Bell

T: +44 7795 463646

E: [email protected]

 

From: 1T3XT BVBA [mailto:[email protected]] 
Sent: 19 August 2011 15:48
To: Post all your questions about iText here
Subject: Re: [iText-questions] PdfEncryptor.IsPrintingAllowed() appears to
give incorrect result

 

On 19/08/2011 16:35, William Bell wrote: 

Am I misunderstanding the function?

You must think of the permissions as a bitset (actually, it IS a bitset).
If a file is encrypted, 0000000000 means: nothing is allowed, whereas
1001001011 means: some things are allowed (but not everything).
If a file isn't encrypted, there's no need for a bitset. Its value is 0 (or
0000000000 if you prefer).
So if you ask a non-encrypted file "Is the 'printing allowed' bit set?" you
get the response: "No, it isn't set!"
Which is a correct answer, because the bit isn't set. Hope this answers your
question.

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
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

Reply via email to