JavaScript > JavaScript for Acrobat API Reference > JavaScript API > OCG > OCG properties > state

state
 
Represents the current on/off state of this OCG.
Changing the state of an OCG does not dirty the document, the OCGs revert to their initial state when the document is loaded again.
Type
Boolean
Access
R/W
Example
Turn on all the OCGs in the given document.
	function TurnOnOCGsForDoc(doc)
	{
		var ocgArray = doc.getOCGs();
		for (var i=0; i < ocgArray.length; i++) 
			ocgArray[i].state = true;
	} 

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.917.html