A marked content.
Method from org.apache.pdfbox.pdmodel.documentinterchange.markedcontent.PDMarkedContent Detail: |
public void addMarkedContent(PDMarkedContent markedContent) {
this.getContents().add(markedContent);
}
Adds a marked content to the contents. |
public void addText(TextPosition text) {
this.getContents().add(text);
}
Adds a text position to the contents. |
public void addXObject(PDXObject xobject) {
this.getContents().add(xobject);
}
Adds an XObject to the contents. |
public String getActualText() {
return this.getProperties() == null ? null :
this.getProperties().getString(COSName.ACTUAL_TEXT);
}
Gets the actual text (ActualText). |
public String getAlternateDescription() {
return this.getProperties() == null ? null :
this.getProperties().getString(COSName.ALT);
}
Gets the alternate description (Alt). |
public List<Object> getContents() {
return this.contents;
}
Gets the contents of the marked content sequence. Can be
|
public String getExpandedForm() {
return this.getProperties() == null ? null :
this.getProperties().getString(COSName.E);
}
Gets the expanded form (E). |
public String getLanguage() {
return this.getProperties() == null ? null :
this.getProperties().getNameAsString(COSName.LANG);
}
Gets the language (Lang). |
public int getMCID() {
return this.getProperties() == null ? null :
this.getProperties().getInt(COSName.MCID);
}
Gets the marked-content identifier. |
public COSDictionary getProperties() {
return this.properties;
}
|
public String getTag() {
return this.tag;
}
|
public String toString() {
StringBuilder sb = new StringBuilder("tag=").append(this.tag)
.append(", properties=").append(this.properties);
sb.append(", contents=").append(this.contents);
return sb.toString();
}
|