iText 9.1.0 API
|
An optional content group is a dictionary representing a collection of graphics that can be made visible or invisible dynamically by users of viewer applications. More...
Public Member Functions |
|
PdfLayer (PdfDictionary layerDictionary) | |
Creates a new layer by existing dictionary, which must be an indirect object. More... |
|
PdfLayer (String name, PdfDocument document) | |
Creates a new layer by its name and document. More... |
|
virtual void | AddChild (iText.Kernel.Pdf.Layer.PdfLayer childLayer) |
Adds a child layer. More... |
|
virtual iText.Kernel.Pdf.Layer.PdfLayer | GetParent () |
Gets the first parent of this layer, be it a title layer, or a usual one. More... |
|
virtual IList< iText.Kernel.Pdf.Layer.PdfLayer > | GetParents () |
Gets all parents of this layer. More... |
|
virtual void | SetName (String name) |
Sets the name of the layer to be displayed in the Layers panel. More... |
|
virtual bool | IsOn () |
Gets the initial visibility of the layer when the document is opened. More... |
|
virtual void | SetOn (bool on) |
Sets the initial visibility of the layer when the document is opened. More... |
|
virtual bool | IsLocked () |
Gets whether the layer is currently locked or not. More... |
|
virtual void | SetLocked (bool locked) |
Use this method to lock an optional content group. More... |
|
virtual bool | IsOnPanel () |
Gets the layer visibility in Acrobat's layer panel More... |
|
virtual void | SetOnPanel (bool onPanel) |
Sets the visibility of the layer in Acrobat's layer panel. More... |
|
virtual ICollection< PdfName > | GetIntents () |
Gets a collection of current intents specified for this layer. More... |
|
virtual void | SetIntents (IList< PdfName > intents) |
Sets the intents of the layer. More... |
|
virtual void | SetCreatorInfo (String creator, String subtype) |
Used by the creating application to store application-specific data associated with this optional content group. More... |
|
virtual void | SetLanguage (String lang, bool preferred) |
Specifies the language of the content controlled by this optional content group More... |
|
virtual void | SetExport (bool export) |
Specifies the recommended state for content in this group when the document (or part of it) is saved by a viewer application to a format that does not support optional content (for example, an earlier version of PDF or a raster image format). More... |
|
virtual void | SetZoom (float min, float max) |
Specifies a range of magnifications at which the content in this optional content group is best viewed. More... |
|
virtual void | SetPrint (String subtype, bool printState) |
Specifies that the content in this group is intended for use in printing More... |
|
virtual void | SetView (bool view) |
Indicates that the group should be set to that state when the document is opened in a viewer application. More... |
|
virtual void | SetUser (String type, params String[] names) |
Specifies one or more users for whom this optional content group is primarily intended. More... |
|
virtual void | SetPageElement (String pe) |
Indicates that the group contains a pagination artifact. More... |
|
virtual PdfIndirectReference | GetIndirectReference () |
Gets the indirect reference to the current layer object. More... |
|
virtual String | GetTitle () |
Gets the title of the layer if it is a title layer, or null if it is a usual layer. More... |
|
virtual IList< iText.Kernel.Pdf.Layer.PdfLayer > | GetChildren () |
Gets the list of the current child layers of the layer. More... |
|
![]() |
|
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 () |
![]() |
|
PdfDictionary | GetPdfObject () |
Gets the object representing the layer. More... |
|
Static Public Member Functions |
|
static iText.Kernel.Pdf.Layer.PdfLayer | CreateTitle (String title, PdfDocument document) |
Creates a title layer. More... |
|
static void | AddOCGRadioGroup (PdfDocument document, IList< iText.Kernel.Pdf.Layer.PdfLayer > group) |
Use this method to set a collection of optional content groups whose states are intended to follow a "radio button" paradigm. More... |
|
Package Functions |
|
override bool | IsWrappedObjectMustBeIndirect () |
Defines if the object behind this wrapper must be an indirect object in the resultant document. More... |
|
virtual PdfDocument | GetDocument () |
Gets the iText.Kernel.Pdf.PdfDocument that owns that layer. More... |
|
virtual PdfDictionary | GetUsage () |
Gets the /Usage dictionary, creating a new one if necessary. More... |
|
![]() |
|
PdfObjectWrapper (T pdfObject) | |
virtual void | SetPdfObject (T pdfObject) |
virtual void | SetForbidRelease () |
virtual void | UnsetForbidRelease () |
virtual void | EnsureUnderlyingObjectHasIndirectReference () |
Static Package Functions |
|
static iText.Kernel.Pdf.Layer.PdfLayer | CreateTitleSilent (String title, PdfDocument document) |
Creates a title layer without registering it in PdfOCProperties. More... |
|
![]() |
|
static void | MarkObjectAsIndirect (PdfObject pdfObject) |
static void | EnsureObjectIsAddedToDocument (PdfObject @object) |
Some wrappers use object's indirect reference to obtain the PdfDocument to which the object belongs to. More... |
|
Package Attributes |
|
String | title |
Used for titling group of objects but not actually grouping them. More... |
|
bool | on = true |
bool | onPanel = true |
bool | locked = false |
iText.Kernel.Pdf.Layer.PdfLayer | parent |
ICollection< iText.Kernel.Pdf.Layer.PdfLayer > | parentLayers |
IList< iText.Kernel.Pdf.Layer.PdfLayer > | children |
ICollection< iText.Kernel.Pdf.Layer.PdfLayer > | childLayers |
An optional content group is a dictionary representing a collection of graphics that can be made visible or invisible dynamically by users of viewer applications.
An optional content group is a dictionary representing a collection of graphics that can be made visible or invisible dynamically by users of viewer applications. In iText they are referenced as layers.
To be able to be wrapped with this iText.Kernel.Pdf.PdfObjectWrapper
|
inline |
Creates a new layer by existing dictionary, which must be an indirect object.
layerDictionary | the layer dictionary, must have an indirect reference. |
|
inline |
Creates a new layer by its name and document.
name | the layer name |
document | the PdfDocument which the layer belongs to |
|
inlinevirtual |
Adds a child layer.
Adds a child layer. Nested layers can only have one parent.
childLayer | the child layer |
|
inlinestatic |
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.
document | the PdfDocument |
group | the radio group |
|
inlinestatic |
Creates a title layer.
Creates a title layer. A title layer is not really a layer but a collection of layers under the same title heading.
title | the title text |
document | the PdfDocument |
|
inlinestaticpackage |
Creates a title layer without registering it in PdfOCProperties.
title | the title of the layer |
document | the document this title layer belongs to |
|
inlinevirtual |
Gets the list of the current child layers of the layer.
Gets the list of the current child layers of the layer. BE CAREFUL! Do not try to add a child layer using the resultant child list, use #addChild method instead.
|
inlinepackagevirtual |
Gets the iText.Kernel.Pdf.PdfDocument that owns that layer.
|
inlinevirtual |
Gets the indirect reference to the current layer object.
Implements iText.Kernel.Pdf.Layer.IPdfOCG.
|
inlinevirtual |
Gets a collection of current intents specified for this layer.
Gets a collection of current intents specified for this layer. The default value is iText.Kernel.Pdf.PdfName.View , so it will be the only element of the resultant collection if no intents are currently specified.
|
inlinevirtual |
Gets the first parent of this layer, be it a title layer, or a usual one.
|
inlinevirtual |
Gets all parents of this layer.
|
inlinevirtual |
Gets the title of the layer if it is a title layer, or null if it is a usual layer.
|
inlinepackagevirtual |
Gets the /Usage dictionary, creating a new one if necessary.
|
inlinevirtual |
Gets whether the layer is currently locked or not.
Gets whether the layer is currently locked or not. If the layer is locked, it will not be possible to change its state (on/off) in a viewer.
|
inlinevirtual |
Gets the initial visibility of the layer when the document is opened.
|
inlinevirtual |
Gets the layer visibility in Acrobat's layer panel
|
inlinepackagevirtual |
Defines if the object behind this wrapper must be an indirect object in the resultant document.
Defines if the object behind this wrapper must be an indirect object in the resultant document.
If this method returns true it doesn't necessarily mean that object must be in the indirect state at any moment, but rather defines that when the object will be written to the document it will be transformed into indirect object if it's not indirect yet.
Return value of this method shouldn't depend on any logic, it should return always true or false.
Implements iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >.
|
inlinevirtual |
Used by the creating application to store application-specific data associated with this optional content group.
creator | a text string specifying the application that created the group |
subtype | a string defining the type of content controlled by the group. Suggested values include but are not limited to Artwork, for graphic-design or publishing applications, and Technical, for technical designs such as building plans or schematics |
|
inlinevirtual |
Specifies the recommended state for content in this group when the document (or part of it) is saved by a viewer application to a format that does not support optional content (for example, an earlier version of PDF or a raster image format).
export | the export state |
|
inlinevirtual |
Sets the intents of the layer.
intents | the list of intents. |
|
inlinevirtual |
Specifies the language of the content controlled by this optional content group
lang | a language string which specifies a language and possibly a locale (for example, es-MX represents Mexican Spanish) |
preferred | used by viewer applications when there is a partial match but no exact match between the system language and the language strings in all usage dictionaries |
|
inlinevirtual |
Use this method to lock an optional content group.
Use this method to lock an optional content group. The state of a locked group cannot be changed through the user interface of a viewer application. Producers can use this entry to prevent the visibility of content that depends on these groups from being changed by users.
locked | sets whether the layer is currently locked or not |
|
inlinevirtual |
Sets the name of the layer to be displayed in the Layers panel.
name | the name of the layer. |
|
inlinevirtual |
Sets the initial visibility of the layer when the document is opened.
on | the initial visibility of the layer |
|
inlinevirtual |
Sets the visibility of the layer in Acrobat's layer panel.
Sets the visibility of the layer in Acrobat's layer panel. If false
the layer cannot be directly manipulated by the user. Note that any children layers will also be absent from the panel.
onPanel | the visibility of the layer in Acrobat's layer panel |
|
inlinevirtual |
Indicates that the group contains a pagination artifact.
pe | one of the following names: "HF" (Header Footer), "FG" (Foreground), "BG" (Background), or "L" (Logo). |
|
inlinevirtual |
Specifies that the content in this group is intended for use in printing
subtype | a name specifying the kind of content controlled by the group; for example, Trapping, PrintersMarks and Watermark |
printState | indicates that the group should be set to that state when the document is printed from a viewer application |
|
inlinevirtual |
Specifies one or more users for whom this optional content group is primarily intended.
type | a name that can be Ind (individual), Ttl (title), or Org (organization). |
names | one or more text strings representing the name(s) of the individual, position or organization |
|
inlinevirtual |
Indicates that the group should be set to that state when the document is opened in a viewer application.
view | the view state |
|
inlinevirtual |
Specifies a range of magnifications at which the content in this optional content group is best viewed.
min | the minimum recommended magnification factors at which the group should be ON. A negative value will set the default to 0 |
max | the maximum recommended magnification factor at which the group should be ON. A negative value will set the largest possible magnification supported by the viewer application |
|
package |
Used for titling group of objects but not actually grouping them.