Daniel Henry wrote:
> Can I turn layers on/off with checkboxes? 

Yes, but you'll need some JavaScript to do this.

I don't have a code sample for the moment, but
take a look at:
http://itextpdf.com/examples/index.php?page=example&id=238

Here you have a field that is set to read-only based
on the state of a checkbox. An AA (Additional Action)
is used.

For a document that is created from scratch (as in your
case), you have the method setAdditionalAction().
Take a look at this example:
http://itextpdf.com/examples/index.php?page=example&id=142

Now you need to combine both examples.
Just using setAdditionalAction(actionName, toggleAction);
could already help, but to be safe, I'd make toggleAction
a JavaScript action that checks the state of the checkbox.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------

_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to