public class

TextRun

extends ContentElement
java.lang.Object
   ↳ com.pdftron.layout.ContentElement
     ↳ com.pdftron.layout.TextRun

Class Overview

A TextRun is a content element that represents a single run of text. A paragraph can contain multiple TextRun objects.

Summary

Public Methods
String getHyperlinkTarget()
String getText()
Get the text content of the TextRun object
void setHyperlinkTarget(String target)
Turns the text run into a hyperlink pointing at the given target.
void setText(String text)
Set the text content of the TextRun object
[Expand]
Inherited Methods
From class com.pdftron.layout.ContentElement
From class java.lang.Object

Public Methods

public String getHyperlinkTarget ()

Returns
  • The URI the hyperlink points at, or an empty string if the text run is not a hyperlink

public String getText ()

Get the text content of the TextRun object

Returns
  • The text content

public void setHyperlinkTarget (String target)

Turns the text run into a hyperlink pointing at the given target.

Parameters
target The URI the hyperlink points at

public void setText (String text)

Set the text content of the TextRun object

Parameters
text The text content to set