Cheryl wrote:
> I need to access the required attribute of a field using itext/java. Can 
> someone tell me know to do this?

Get the field dictionary, and look for the "Ff" key (PdfName.FF; stands 
for "Field flags"). The value corresponding with this key is a number 
that you should treat as a bitset.

If the first bit is on, the field is read-only.
If the second bit is on, the field is required.
If the third bit is on, the field mustn't be exported.

In other words: you have to look if the second bit is on.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to