Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate

com.aspose.pdf.elements
Class Text

java.lang.Object
  extended bycom.aspose.pdf.elements.PdfElementBase
      extended bycom.aspose.pdf.elements.Paragraph
          extended bycom.aspose.pdf.elements.Text
All Implemented Interfaces:
java.lang.Cloneable

public class Text
extends Paragraph

Represents a text Paragraph in a Pdf document.


Constructor Summary
Text(Section section)
          Initialize a new instance of the Text class.
Text(Section section, java.lang.String content)
          Initialize a new instance of the Text class.
 
Method Summary
 org.w3c.dom.Element getDOMElement()
          Gets a DOM representation of the pdf element.
 Segments getSegments()
          Gets a Segments collection that indicates all segments in the text paragraph.
 TextInfo getTextInfo()
          Gets a TextInfo object that indicates the text info of the text paragraph.
 void setSegments(Segments segments)
          Sets a Segments collection that indicates all segments in the text paragraph.
 void setTextInfo(TextInfo textInfo)
          Sets a TextInfo object that indicates the text info of the text paragraph.
 
Methods inherited from class com.aspose.pdf.elements.Paragraph
clone, getMargin, isDisabled, isFirstParagraph, isKeptTogether, isOnOddPage, setDisabled, setFirstParagraph, setKeptTogether, setMargin, setOnOddPage
 
Methods inherited from class com.aspose.pdf.elements.PdfElementBase
getElementFactory, getID, getNameIndex, setID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Text

public Text(Section section,
            java.lang.String content)
Initialize a new instance of the Text class.

 [SampleCode]
 Pdf pdf = new Pdf();
 Section sec1 = pdf.getSections().add();
 Text text1 = new Text(sec1,"seg1 ");
 sec1.getParagraphs().add(text1);
 

Parameters:
section - The Text will inherit format info from the Section.

Text

public Text(Section section)
Initialize a new instance of the Text class.

Parameters:
section - The Text will inherit format info from the Section.
Method Detail

getTextInfo

public TextInfo getTextInfo()
Gets a TextInfo object that indicates the text info of the text paragraph.

Returns:
Returns the TextInfo object.

setTextInfo

public void setTextInfo(TextInfo textInfo)
Sets a TextInfo object that indicates the text info of the text paragraph.

Parameters:
textInfo - The TextInfo to set.

getSegments

public Segments getSegments()
Gets a Segments collection that indicates all segments in the text paragraph.

Returns:
Returns the segments.

setSegments

public void setSegments(Segments segments)
Sets a Segments collection that indicates all segments in the text paragraph.

Parameters:
segments - The segments to set.

getDOMElement

public org.w3c.dom.Element getDOMElement()
                                  throws AsposeBaseException
Description copied from class: PdfElementBase
Gets a DOM representation of the pdf element.

Overrides:
getDOMElement in class Paragraph
Throws:
AsposeBaseException
See Also:
PdfElementBase.getDOMElement()