Class PdfLayerMembership

All Implemented Interfaces:
PdfOCG

class PdfLayerMembership extends PdfDictionary implements PdfOCG
Content typically belongs to a single optional content group, and is visible when the group is ON and invisible when it is OFF. To express more complex visibility policies, content should not declare itself to belong to an optional content group directly, but rather to an optional content membership dictionary represented by this class.
  • Field Details

  • Constructor Details

    • PdfLayerMembership

      public PdfLayerMembership(PdfWriter writer)
      Creates a new, empty, membership layer.
      Parameters:
      writer - the writer
  • Method Details

    • getRef

      public PdfIndirectReference getRef()
      Gets the PdfIndirectReference that represents this membership layer.
      Specified by:
      getRef in interface PdfOCG
      Returns:
      the PdfIndirectReference that represents this layer
    • getLayers

      public Collection getLayers()
      Gets the member layers.
      Returns:
      the member layers
    • setVisibilityPolicy

      public void setVisibilityPolicy(PdfName type)
      Sets the visibility policy for content belonging to this membership dictionary. Possible values are ALLON, ANYON, ANYOFF and ALLOFF. The default value is ANYON.
      Parameters:
      type - the visibility policy
    • getPdfObject

      public PdfObject getPdfObject()
      Gets the dictionary representing the membership layer. It just returns this.
      Specified by:
      getPdfObject in interface PdfOCG
      Returns:
      the dictionary representing the layer