Class TagReference
java.lang.Object
com.itextpdf.kernel.pdf.tagutils.TagReference
The class is used to provide connection between structure element of
Tagged PDF document and marked content sequence in PDF stream.
See TagTreePointer.getTagReference(int) and PdfCanvas.openTag(TagReference).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected PdfDictionaryprotected PdfStructElemprotected PdfNameprotected TagTreePointer -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTagReference(PdfStructElem referencedTag, TagTreePointer tagPointer, int insertIndex) Creates aTagReferenceinstance which represents a reference toPdfStructElem. -
Method Summary
Modifier and TypeMethodDescriptionaddProperty(PdfName name, PdfObject value) Adds property, which will be associated with marked-content sequence.intCreates next marked content identifier, which will be used to mark content in PDF stream.Gets properties, which will be associated with marked-content sequence asPdfDictionary.getProperty(PdfName name) Gets property which related to specified name.getRole()Gets role of structure element.removeProperty(PdfName name) Removes property.
-
Field Details
-
tagPointer
-
insertIndex
protected int insertIndex -
referencedTag
-
role
-
properties
-
-
Constructor Details
-
TagReference
Creates aTagReferenceinstance which represents a reference toPdfStructElem.- Parameters:
referencedTag- 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- the tag pointer to structure elementinsertIndex- if insertIndex is -1, the referencedTag will be used as a source of reference, otherwise the kid will be used
-
-
Method Details
-
getRole
-
createNextMcid
public int createNextMcid()Creates next marked content identifier, which will be used to mark content in PDF stream.- Returns:
- the marked content identifier
-
addProperty
Adds property, which will be associated with marked-content sequence.- Parameters:
name- the name of the propertyvalue- the value of the property- Returns:
- the
TagReferenceinstance
-
removeProperty
Removes property. The property will not be associated with marked-content sequence.- Parameters:
name- the name of property to be deleted- Returns:
- the
TagReferenceinstance
-
getProperty
-
getProperties
Gets properties, which will be associated with marked-content sequence asPdfDictionary.- Returns:
- the properties
-