[EMAIL PROTECTED] wrote:
> I want to know how can I hide a Field of one AcroForm. I want throught
> the iText API change dinamically the visibility of AcroFields.
OK.
> I have seen in the API that it is possible to work with layers but I
> want to know if there is other method to do it.
Are you talking about OCG?
I'd like to know where you have seen this, because
that's not really how I would (advise to) do it.
> I have seen in the API, the method public boolean* setField(String name,
> String value, String display)
> where the last parameter say:
>
> display - the string that is used for the appearance. If null the value
> parameter will be used
Indeed. Normally you want to value to be identical to
what is displayed, except for instance for currencies.
You may want the value to be 30, but display $30,00.
This has nothing to do with making fields visible/invisible.
> I have been testing to put display.hidden, display.hide.
Some question as with the layers: where did you find
these examples? Because they are wrong.
> I don't know
> when I have to use that parameter and if is possible to use it to
> resolve this problem.
What you need is the method setFieldProperty as described
on page 507 of the book. I don't have (the time to make)
an example that hides a field, but you should try something
like this:
form.setFieldProperty("my_field", "setflags", PdfAnnotation.FLAGS_HIDDEN);
I'm writing this line from memory. Don't shoot me if it doesn't work
without changes, don't blame me for not having the time to provide an
example (*).
br,
Bruno
(*) because some people do
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/