2 Replies Latest reply: Oct 31, 2013 9:33 AM by ToM_1st RSS

    Appearance state (AS) vs. value (V) of Button Form Fields

    ToM_1st Community Member

      It all started with a PDF where the state of the checkboxes was visually different from our viewer to the acrobat reader.

      After some investigation the problem was a different state of the /V and the /AS attributes:

       

      ...

      /FT/Btn

      /Subtype/Widget

      /T(Checkbox1)

      /V (0)

      /AP <</N <</Off 20 0 R /0 21 0 R>>>>

      /AS/Off

      ...

       

      So the value states that the checkbox is checked and the appearance state says it is not checked.

      I looked up the PDF spec it says:

       

      V=value

      (page 440) The V entry in the field dictionary (see Table 220) holds a name object representing the check box’s appearance state, which shall be used to select the appropriate appearance from the appearance dictionary.

       

      AS=appearance state

      (page 383) (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation’s appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, “Appearance Streams”).

       

      Our viewer analyzed the content (/V) and the adobe reader obviously considered the appearance state (/AS).

      If both are set and are different which one 'wins'?

      From my perspective it is in violation of the spec that both are different. However

       

      1.) since /V is optional and /AS is required one can argue that /AS has a slight "advantage" so to speak

      2.) Also PDF/A-1 states that: "Every form field shall have an appearance dictionary associated with the field's data. A conforming reader shall render the field according to the appearance dictionary without regard to the form data." Which would also indicate in case of doubt look at the AS.

       

      It would be nice if anyone can share his thoughts about it...