I haven't test it. I read it in the book about Annotation but I
supposed that the FLAGS_HIDDEN where only for the Annotation associated
to one field but not for the field.

Regards.

-----Mensaje original-----
De: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] En nombre de
Bruno Lowagie (iText)
Enviado el: lunes 29 de enero de 2007 13:13
Para: Post all your questions about iText here
Asunto: Re: [iText-questions] Hidden Acrofields

[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=DEVDE
V
_______________________________________________
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/

Banco de España - Aviso legal
 
Este mensaje, su contenido y cualquier fichero transmitido 
con él está dirigido únicamente a su destinatario y es 
confidencial. Por ello, se informa a quien lo reciba por error o 
tenga conocimiento del mismo sin ser su destinatario, que la 
información contenida en él es reservada y su uso no 
autorizado, por lo que en tal caso le rogamos nos lo comunique 
por la misma vía o por teléfono (+ 34 91 338 66 66), así como 
que se abstenga de reproducir el mensaje mediante cualquier 
medio o remitirlo o entregarlo a otra persona, procediendo a su 
borrado de manera inmediata.

El Banco de España se reserva las acciones legales que le 
correspondan contra todo tercero que acceda de forma 
ilegítima al contenido de cualquier mensaje externo procedente 
del mismo.

Para informacion y consultas visite nuestra web 
http://www.bde.es


Banco de España - Disclaimer
This message, its content and any file attached thereto is for 
the intended recipient only and is confidential. If you have 
received this e-mail in error or had access to it, you should 
note that the information in it is private and any use thereof 
is unauthorised. In such an event please notify us by e-mail or 
by telephone (+ 34 91 338 66 66). Any reproduction of this 
e-mail by whatsoever means and any transmission or dissemination 
thereof to other persons is prohibited. It should be deleted 
immediately from your system.

The Banco de España reserves the right to take legal action 
against any persons unlawfully gaining access to the content of 
any external message it has emitted.

For additional information, please visit our website 
http://www.bde.es

-------------------------------------------------------------------------
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/

Reply via email to