2 Replies Latest reply: Apr 9, 2012 1:14 PM by fozzter RSS

    How to determine initial hide/show state of form button fields?

    fozzter

      I have a page with five rollover buttons labeled 1,2,3,4,5.  Each button when rolled shows an image in a mutually exclusive fashion.  When I load the page in Acrobat Reader, initially the first button is highlighted and the assigned image is shown, and it works as expected.  When I load the page in a custom renderer project, all the buttons are initially highlighted.  After rolling over all the buttons once (activating the enter/exit triggers in the Additional Actions dictionary) the buttons work as expected, in a mutually exclusive fashion.

       

      My question: how is the initial hide/show state of a form field established?  I've researched the 1.7 Reference but can't figure it out.

       

      Thanks,

       

      Jason

        • 1. Re: How to determine initial hide/show state of form button fields?
          lrosenth Adobe Employee

          Initial state is set by the value and/or the D(efault) appearance.

           

          Details on how to render annotations and their appearances are in ISO 32000-1:2008.

          • 2. Re: How to determine initial hide/show state of form button fields?
            fozzter Community Member

            Figured it out... need to set the initial visibility based on the Annotation flags, bit position 2 ("Hidden"), defined in ISO 32000-1:2008 Table 165 (page 385).  The field definition and widget annotation definition are merged into a single dictionary... that was what threw me off:

                 

             

            Table 165 – Annotation flags

            Bit position
             

            Name

             

            Meaning

             

            2

             

            Hidden

             

            (PDF 1.2)

             

             

            If set, do not display or print the annotation or allow it to interact with the user, regardless of its annotation type or whether an annotation handler is available.

            NOTE 1 In cases where screen space is limited, the ability to hide and show annotations selectively can be used in combination with appearance streams (see 12.5.5, "Appearance Streams") to display auxiliary pop-up information similar in function to online help systems.