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

This class represents /OCProperties entry if pdf catalog and manages the layers of the pdf document. More...

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

Public Member Functions

  PdfOCProperties (PdfDocument document)
  Creates a new PdfOCProperties instance. More...
 
  PdfOCProperties (PdfDictionary ocPropertiesDict)
  Creates a new PdfOCProperties instance by the dictionary it represents, the dictionary must be an indirect object. More...
 
virtual void  AddOCGRadioGroup (IList< PdfLayer > group)
  Use this method to set a collection of optional content groups whose states are intended to follow a "radio button" paradigm. More...
 
virtual PdfObject  FillDictionary ()
  Fills the underlying PdfDictionary object with the current layers and their settings. More...
 
override void  Flush ()
 
virtual IList< PdfLayer GetLayers ()
  Gets the list of all the layers currently registered in the OCProperties. 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 bool  IsFlushed ()
 

Detailed Description

This class represents /OCProperties entry if pdf catalog and manages the layers of the pdf document.

This class represents /OCProperties entry if pdf catalog and manages the layers of the pdf document.

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

Constructor & Destructor Documentation

◆ PdfOCProperties() [1/2]

iText.Kernel.Pdf.Layer.PdfOCProperties.PdfOCProperties ( PdfDocument  document )
inline

Creates a new PdfOCProperties instance.

Parameters
document the document the optional content belongs to

◆ PdfOCProperties() [2/2]

iText.Kernel.Pdf.Layer.PdfOCProperties.PdfOCProperties ( PdfDictionary  ocPropertiesDict )
inline

Creates a new PdfOCProperties instance by the dictionary it represents, the dictionary must be an indirect object.

Parameters
ocPropertiesDict the dictionary of optional content properties, must have an indirect reference.

Member Function Documentation

◆ AddOCGRadioGroup()

virtual void iText.Kernel.Pdf.Layer.PdfOCProperties.AddOCGRadioGroup ( IList< PdfLayer group )
inlinevirtual

Use this method to set a collection of optional content groups whose states are intended to follow a "radio button" paradigm.

Use this method to set a collection of optional content groups whose states are intended to follow a "radio button" paradigm. That is, the state of at most one optional content group in the array should be ON at a time: if one group is turned ON, all others must be turned OFF.

Parameters
group the radio group

◆ FillDictionary()

virtual PdfObject iText.Kernel.Pdf.Layer.PdfOCProperties.FillDictionary ( )
inlinevirtual

Fills the underlying PdfDictionary object with the current layers and their settings.

Fills the underlying PdfDictionary object with the current layers and their settings. Note that it completely regenerates the dictionary, so your direct changes to the dictionary will not take any affect.

Returns
the resultant dictionary

◆ GetLayers()

virtual IList<PdfLayer> iText.Kernel.Pdf.Layer.PdfOCProperties.GetLayers ( )
inlinevirtual

Gets the list of all the layers currently registered in the OCProperties.

Gets the list of all the layers currently registered in the OCProperties. Note that this is just a new list and modifications to it will not affect anything.