Class PdfActionOcgState

java.lang.Object
com.itextpdf.kernel.pdf.action.PdfActionOcgState

public class PdfActionOcgState extends Object
This is a helper class for optional content states use in Set-OCG-State actions. See PdfAction.createSetOcgState(java.util.List).
  • Constructor Details

  • Method Details

    • getState

      public PdfName getState()
      Gets the state the optional content groups should be switched to
      Returns:
      the state, one of the following: PdfName.OFF, PdfName.ON, PdfName.Toggle
    • getOcgs

      public List<PdfDictionary> getOcgs()
      Gets a list of optional content groups that shall have the state changed
      Returns:
      the list of optional content groups
    • getObjectList

      public List<PdfObject> getObjectList()
      Gets a list of PdfObject that is describing this particular optional content group states.
      Returns:
      a list of PdfObject for construction of a PdfArray