9 Replies Latest reply on Nov 7, 2013 8:50 AM by Dave Merchant

    initState works in Acrobat but not Reader

    JesseH88

      Hi I am new here and not very good with javascript, so please bare with me.

       

      I have created a document with five radio buttons that toggle between layers via executing OCG .state and .initState scripts depending on which button is selected.  Both work fine in Acrobat in setting the current state and the default state of the layers. But when I open the document in Reader, only .state seems to toggle between layer visibility and .initState fails to set the default state of layers.  Essentially what I need is to be able to set the default state to layers in Reader.   I noticed that the Layer Properties panal is not editable in reader and that this may be the culprit, but I can not find how to activate it or to even enable manualy setting the default state of layers to on or off.

       

       

      In addition to the FindOCG script at the document level here are samples of what I have set as mouse up actions to the radio buttons.

       

      FindOCG("LayerName).state = true;

       

      FindOCG("LayerName").initState = true;

       

      Each of these is its own action.

       

       

       

      I am using Acrobat Pro 10.1.8 and Reader 11.0.3 on Windows 7 Ultimate.

       

       

      Any help with this would be greatly apriciated.

       

      Thanks

       

      Jesse