Class OptionalContentGroup

java.lang.Object
com.datalogics.PDFL.OptionalContentGroup

public class OptionalContentGroup extends Object
A dictionary used to manage graphics images in a PDF. An Optional Content Group is a dictionary that represents a set of graphics images that users can turn on or off in a PDF document, making them visible or invisible.

In a PDF Viewer, Optional Content Groups are referred to as "Layers."

  • Constructor Details

    • OptionalContentGroup

      public OptionalContentGroup(Document doc, String name)
      Create a new OptionalContentGroup.

      Parameters:
      doc - The document that the new OptionalContentGroup will belong to.
      name - The name given to the new OptionalContentGroup.
  • 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
    • getName

      public String getName()
      Get the name of the optional content group

      Returns:
      the name
    • setName

      public void setName(String name)
      Set the name of the optional content group

    • getIntent

      public List<String> getIntent()
      Gets the intent list for an optional-content group. An intent is a string value broadly describing the intended use, either View or Design.

      A group's content is considered to be optional (that is, the group's state is considered in its visibility) if any intent in its list matches an intent of the context. The intent list of the context is usually set from the intent list of the document configuration.

      Returns:
      An array containing intent strings.
    • setIntent

      public void setIntent(List<String> intents)
      Sets the intent list for an optional-content group. An intent is a string value broadly describing the intended use, either View or Design.

      A group's content is considered to be optional (that is, the group's state is considered in its visibility) if any intent in its list matches an intent of the context. The intent list of the context is usually set from the intent list of the document configuration.

    • getPDFDict

      public PDFDict getPDFDict()
      Retrieve the PDFObject representation of this object