Table of Contents

Class TagReference

Namespace
iText.Kernel.Pdf.Tagutils
Assembly
itext.kernel.dll

The class is used to provide connection between structure element of Tagged PDF document and marked content sequence in PDF stream.

public class TagReference
Inheritance
TagReference
Inherited Members

Remarks

The class is used to provide connection between structure element of Tagged PDF document and marked content sequence in PDF stream.

See GetTagReference(int) and OpenTag(TagReference).

Constructors

TagReference(PdfStructElem, TagTreePointer, int)

Creates a TagReference instance which represents a reference to PdfStructElem.

protected TagReference(PdfStructElem referencedTag, TagTreePointer tagPointer, int insertIndex)

Parameters

referencedTag PdfStructElem

a structure element to which marked content will link (if insertIndex is -1, otherwise to MC will link to kid with insertIndex of passed structure element)

tagPointer TagTreePointer

the tag pointer to structure element

insertIndex int

if insertIndex is -1, the referencedTag will be used as a source of reference, otherwise the kid will be used

Fields

insertIndex

protected int insertIndex

Field Value

int

properties

protected PdfDictionary properties

Field Value

PdfDictionary

referencedTag

protected PdfStructElem referencedTag

Field Value

PdfStructElem

role

protected PdfName role

Field Value

PdfName

tagPointer

protected TagTreePointer tagPointer

Field Value

TagTreePointer

Methods

AddProperty(PdfName, PdfObject)

Adds property, which will be associated with marked-content sequence.

public virtual TagReference AddProperty(PdfName name, PdfObject value)

Parameters

name PdfName

the name of the property

value PdfObject

the value of the property

Returns

TagReference

the TagReference instance

CreateNextMcid()

Creates next marked content identifier, which will be used to mark content in PDF stream.

public virtual int CreateNextMcid()

Returns

int

the marked content identifier

GetProperties()

Gets properties, which will be associated with marked-content sequence as PdfDictionary.

public virtual PdfDictionary GetProperties()

Returns

PdfDictionary

the properties

GetProperty(PdfName)

Gets property which related to specified name.

public virtual PdfObject GetProperty(PdfName name)

Parameters

name PdfName

the name of the property

Returns

PdfObject

the value of the property

GetRole()

Gets role of structure element.

public virtual PdfName GetRole()

Returns

PdfName

the role of structure element

RemoveProperty(PdfName)

Removes property.

public virtual TagReference RemoveProperty(PdfName name)

Parameters

name PdfName

the name of property to be deleted

Returns

TagReference

the TagReference instance

Remarks

Removes property. The property will not be associated with marked-content sequence.