iText 7 7.1.8 API
iText.Kernel.Pdf.Layer.PdfLayerMembership Class Reference

Content typically belongs to a single optional content group, and is visible when the group is ON and invisible when it is OFF. More...

Inheritance diagram for iText.Kernel.Pdf.Layer.PdfLayerMembership:
iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary > iText.Kernel.Pdf.Layer.IPdfOCG

Public Member Functions

  PdfLayerMembership (PdfDocument doc)
  Creates a new, empty membership layer. More...
 
  PdfLayerMembership (PdfDictionary membershipDictionary)
  Creates a new PdfLayerMembership instance by its PdfDictionary, which must be an indirect object. More...
 
virtual ICollection< PdfLayer GetLayers ()
  Gets the collection of the layers this layer membership operates with. More...
 
virtual void  AddLayer (PdfLayer layer)
  Adds a new layer to the current layer membership. More...
 
virtual void  SetVisibilityPolicy (PdfName visibilityPolicy)
  Sets the visibility policy for content belonging to this membership dictionary. More...
 
virtual PdfName  GetVisibilityPolicy ()
  Gets the visibility policy for content belonging to this optional content membership dictionary. More...
 
virtual void  SetVisibilityExpression (PdfVisibilityExpression visibilityExpression)
  Sets the visibility expression for content belonging to this membership dictionary. More...
 
virtual PdfVisibilityExpression  GetVisibilityExpression ()
  Gets the visibility expression for content belonging to this optional content membership dictionary. More...
 
virtual PdfIndirectReference  GetIndirectReference ()
  Gets the More...
 
- Public Member Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >
virtual T  GetPdfObject ()
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document, PdfIndirectReference reference)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  SetModified ()
 
virtual void  Flush ()
 
virtual bool  IsFlushed ()
 
- Public Member Functions inherited from iText.Kernel.Pdf.Layer.IPdfOCG
PdfDictionary  GetPdfObject ()
  Gets the object representing the layer. More...
 

Detailed Description

Content typically belongs to a single optional content group, and is visible when the group is ON and invisible when it is OFF.

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.

To be able to be wrapped with this iText.Kernel.Pdf.PdfObjectWrapper the iText.Kernel.Pdf.PdfObject must be indirect.

Constructor & Destructor Documentation

◆ PdfLayerMembership() [1/2]

iText.Kernel.Pdf.Layer.PdfLayerMembership.PdfLayerMembership ( PdfDocument  doc )
inline

Creates a new, empty membership layer.

◆ PdfLayerMembership() [2/2]

iText.Kernel.Pdf.Layer.PdfLayerMembership.PdfLayerMembership ( PdfDictionary  membershipDictionary )
inline

Creates a new PdfLayerMembership instance by its PdfDictionary, which must be an indirect object.

Parameters
membershipDictionary the membership dictionary, must have an indirect reference.

Member Function Documentation

◆ AddLayer()

virtual void iText.Kernel.Pdf.Layer.PdfLayerMembership.AddLayer ( PdfLayer  layer )
inlinevirtual

Adds a new layer to the current layer membership.

Parameters
layer the layer to be added

◆ GetIndirectReference()

virtual PdfIndirectReference iText.Kernel.Pdf.Layer.PdfLayerMembership.GetIndirectReference ( )
inlinevirtual

Gets the

PdfIndirectReference that represents this layer.

Returns
the
PdfIndirectReference that represents this layer

Implements iText.Kernel.Pdf.Layer.IPdfOCG.

◆ GetLayers()

virtual ICollection<PdfLayer> iText.Kernel.Pdf.Layer.PdfLayerMembership.GetLayers ( )
inlinevirtual

Gets the collection of the layers this layer membership operates with.

◆ GetVisibilityExpression()

virtual PdfVisibilityExpression iText.Kernel.Pdf.Layer.PdfLayerMembership.GetVisibilityExpression ( )
inlinevirtual

Gets the visibility expression for content belonging to this optional content membership dictionary.

◆ GetVisibilityPolicy()

virtual PdfName iText.Kernel.Pdf.Layer.PdfLayerMembership.GetVisibilityPolicy ( )
inlinevirtual

Gets the visibility policy for content belonging to this optional content membership dictionary.

◆ SetVisibilityExpression()

virtual void iText.Kernel.Pdf.Layer.PdfLayerMembership.SetVisibilityExpression ( PdfVisibilityExpression  visibilityExpression )
inlinevirtual

Sets the visibility expression for content belonging to this membership dictionary.

Parameters
visibilityExpression A (nested) array of which the first value is /And, /Or, or /Not followed by a series of indirect references to OCGs or other visibility expressions.

◆ SetVisibilityPolicy()

virtual void iText.Kernel.Pdf.Layer.PdfLayerMembership.SetVisibilityPolicy ( PdfName  visibilityPolicy )
inlinevirtual

Sets the visibility policy for content belonging to this membership dictionary.

Sets the visibility policy for content belonging to this membership dictionary. Possible values are AllOn, AnyOn, AnyOff and AllOff. AllOn - Visible only if all of the entries are ON. AnyOn - Visible if any of the entries are ON. AnyOff - Visible if any of the entries are OFF. AllOff - Visible only if all of the entries are OFF. The default value is AnyOn.

Parameters
visibilityPolicy the visibility policy