Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.documentinterchange.markedcontent

public Class PDMarkedContent

extends Object
Class Inheritance
Known Direct Subclasses
org.apache.pdfbox.pdmodel.documentinterchange.taggedpdf.PDArtifactMarkedContent
Imports
java.util.ArrayList, .List, org.apache.pdfbox.cos.COSDictionary, .COSName, org.apache.pdfbox.pdmodel.documentinterchange.taggedpdf.PDArtifactMarkedContent, org.apache.pdfbox.pdmodel.graphics.PDXObject, org.apache.pdfbox.text.TextPosition

A marked content.
Author
Johannes Koch

Field Summary

Modifier and TypeField and Description
private final List<Object>
private final COSDictionary
private final String

Constructor Summary

AccessConstructor and Description
public
PDMarkedContent(COSName
the tag
tag
,
COSDictionary
the properties
properties
)

Creates a new marked content object.

Method Summary

Modifier and TypeMethod and Description
public void
addMarkedContent(PDMarkedContent
the marked content
markedContent
)

Adds a marked content to the contents.

public void
addText(TextPosition
the text position
text
)

Adds a text position to the contents.

public void
addXObject(PDXObject
the XObject
xobject
)

Adds an XObject to the contents.

public static PDMarkedContent

Returns:

the marked-content sequence
create
(COSName
the tag
tag
,
COSDictionary
the properties
properties
)

Creates a marked-content sequence.

public String

Returns:

the actual text
getActualText
()

Gets the actual text (ActualText).

public String

Returns:

the alternate description
getAlternateDescription
()

Gets the alternate description (Alt).

public List<Object>

Returns:

the contents of the marked content sequence
getContents
()

Gets the contents of the marked content sequence.

public String

Returns:

the expanded form
getExpandedForm
()

Gets the expanded form (E).

public String

Returns:

the language
getLanguage
()

Gets the language (Lang).

public int

Returns:

the marked-content identifier, or -1 if it doesn't exist.
getMCID
()

Gets the marked-content identifier.

public COSDictionary

Returns:

the properties
getProperties
()

Gets the properties.

public String

Returns:

the tag
getTag
()

Gets the tag.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

contentsback to summary
private final List<Object> contents
propertiesback to summary
private final COSDictionary properties
tagback to summary
private final String tag

Constructor Detail

PDMarkedContentback to summary
public PDMarkedContent(COSName tag, COSDictionary properties)

Creates a new marked content object.

Parameters
tag:COSName

the tag

properties:COSDictionary

the properties

Method Detail

addMarkedContentback to summary
public void addMarkedContent(PDMarkedContent markedContent)

Adds a marked content to the contents.

Parameters
markedContent:PDMarkedContent

the marked content

addTextback to summary
public void addText(TextPosition text)

Adds a text position to the contents.

Parameters
text:TextPosition

the text position

addXObjectback to summary
public void addXObject(PDXObject xobject)

Adds an XObject to the contents.

Parameters
xobject:PDXObject

the XObject

createback to summary
public static PDMarkedContent create(COSName tag, COSDictionary properties)

Creates a marked-content sequence.

Parameters
tag:COSName

the tag

properties:COSDictionary

the properties

Returns:PDMarkedContent

the marked-content sequence

getActualTextback to summary
public String getActualText()

Gets the actual text (ActualText).

Returns:String

the actual text

getAlternateDescriptionback to summary
public String getAlternateDescription()

Gets the alternate description (Alt).

Returns:String

the alternate description

getContentsback to summary
public List<Object> getContents()

Gets the contents of the marked content sequence. Can be

Returns:List<Object>

the contents of the marked content sequence

getExpandedFormback to summary
public String getExpandedForm()

Gets the expanded form (E).

Returns:String

the expanded form

getLanguageback to summary
public String getLanguage()

Gets the language (Lang).

Returns:String

the language

getMCIDback to summary
public int getMCID()

Gets the marked-content identifier.

Returns:int

the marked-content identifier, or -1 if it doesn't exist.

getPropertiesback to summary
public COSDictionary getProperties()

Gets the properties.

Returns:COSDictionary

the properties

getTagback to summary
public String getTag()

Gets the tag.

Returns:String

the tag

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override