Module org.sejda.sambox
Class PDMarkedContent
java.lang.Object
org.sejda.sambox.pdmodel.documentinterchange.markedcontent.PDMarkedContent
- Direct Known Subclasses:
PDArtifactMarkedContent
A marked content.
- Author:
- Johannes Koch
-
Constructor Summary
ConstructorsConstructorDescriptionPDMarkedContent(COSName tag, COSDictionary properties) Creates a new marked content object. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMarkedContent(PDMarkedContent markedContent) Adds a marked content to the contents.voidaddText(TextPosition text) Adds a text position to the contents.voidaddXObject(PDXObject xobject) Adds an XObject to the contents.static PDMarkedContentcreate(COSName tag, COSDictionary properties) Creates a marked-content sequence.Gets the actual text (ActualText).Gets the alternate description (Alt).Gets the contents of the marked content sequence.Gets the expanded form (E).Gets the language (Lang).intgetMCID()Gets the marked-content identifier.Gets the properties.getTag()Gets the tag.toString()
-
Constructor Details
-
PDMarkedContent
Creates a new marked content object.- Parameters:
tag- the tagproperties- the properties
-
-
Method Details
-
create
Creates a marked-content sequence.- Parameters:
tag- the tagproperties- the properties- Returns:
- the marked-content sequence
-
getTag
Gets the tag.- Returns:
- the tag
-
getProperties
Gets the properties.- Returns:
- the properties
-
getMCID
public int getMCID()Gets the marked-content identifier.- Returns:
- the marked-content identifier, or -1 if it doesn't exist.
-
getLanguage
Gets the language (Lang).- Returns:
- the language
-
getActualText
Gets the actual text (ActualText).- Returns:
- the actual text
-
getAlternateDescription
Gets the alternate description (Alt).- Returns:
- the alternate description
-
getExpandedForm
Gets the expanded form (E).- Returns:
- the expanded form
-
getContents
Gets the contents of the marked content sequence. Can be- Returns:
- the contents of the marked content sequence
-
addText
Adds a text position to the contents.- Parameters:
text- the text position
-
addMarkedContent
Adds a marked content to the contents.- Parameters:
markedContent- the marked content
-
addXObject
Adds an XObject to the contents.- Parameters:
xobject- the XObject
-
toString
-