Class OptionalContentMembershipDict

java.lang.Object
com.datalogics.PDFL.OptionalContentMembershipDict

public class OptionalContentMembershipDict extends Object
Attaches content to one or more optional content groups. Form, container, and annotation objects can be associated with one or more optional content groups. By associating them with an optional content group, they become part of that 'layer', and the user can control the visibility of the content.

Note that by placing other element objects in a container, they can also be associated with an optional content group.

An OptionalContentMembershipDict connects content to the OptionalContentGroup; it contains a list of OptionalContentGroups, and rules for determining visibility when the OptionalContentGroups have conflicting on/off states in the active OptionalContentContext.

An OptionalContentMembershipDict cannot be changed once created; you must create a new OptionalContentMembershipDict and change the objects to point to it.

  • Constructor Details

    • OptionalContentMembershipDict

      public OptionalContentMembershipDict(Document doc, List<OptionalContentGroup> ocgs, VisibilityPolicy vp)
      Create a new OptionalContentMembershipDict.

      Parameters:
      doc - The document that the new OptionalContentMembershipDict will belong to.
      ocgs - The list of OptionalContentGroups this MembershipDict refers to.
      vp - The VisibilityPolicy of this MembershipDict.
    • OptionalContentMembershipDict

      public OptionalContentMembershipDict(Document doc, List<OptionalContentGroup> ocgs, VisibilityPolicy vp, PDFArray visibilityExpression)
      Create a new OptionalContentMembershipDict.

      Parameters:
      doc - The document that the new OptionalContentMembershipDict will belong to.
      ocgs - The list of OptionalContentGroups this MembershipDict refers to.
      vp - The VisibilityPolicy of this MembershipDict.
      visibilityExpression - The VisibilityExpression of this MembershipDict.
  • Method Details

    • delete

      public void delete()
    • equals

      public boolean equals(Object rhs)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getOptionalContentGroups

      public List<OptionalContentGroup> getOptionalContentGroups()
      Gets the list of OptionalContentGroups for this membership dictionary. This may consist of one OCG or several.

      Returns:
      An array containing OptionalContentGroups.
    • getVisibilityPolicy

      public VisibilityPolicy getVisibilityPolicy()
      Gets the Visbility Policy for this membership dictionary.

      Returns:
      A Visibility Policy.
    • getVisibilityExpression

      public PDFArray getVisibilityExpression()
      GetVisibilityExpression Gets the Visibility Expression for this membership dictionary.
      Returns:
      A Visibility Expression array.