4 Replies Latest reply on Jul 2, 2008 5:19 AM by Patrick Leckey

    Controlling OCG display properties

    Level 1
      I am trying to automate the set up of my layers (OCG's) in Acrobat.

      Apparently, according to the JavaScript Reference (and Thom Parkers tutorial - http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/create_use_layers/)

      there is no way to control the View/Print settings of the OCG layer via JavaScript.

      What I want to do, is set one OCG, to print only and the other to view only via JavaScript - but there isn't a documented way to do this. Apparently you can only do it the layer's properties window.

      Does anyone know of a workaround to setting this property?

      I am working in a 'Trusted Environment' and using app level JavaScripts to set this.

      I suppose, I could put a script in the WillPrint and DidPrint document actions to toggle the state of my layers before and after printing - but I thought that actually setting the layer properties would be 'safer' and more reliable.

      Any thoughts or suggestions would be appreciated.

      -Andrew