|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.aspose.pdf.elements.PdfElementBase com.aspose.pdf.elements.Paragraph com.aspose.pdf.elements.Text
public class Text
Represents a text Paragraph in a Pdf document. The space between two lines in one Paragraph is always the same.
Constructor Summary | |
---|---|
Text(HeaderFooter hf)
Initializes a new instance of the Text class. |
|
Text(HeaderFooter hf,
java.lang.String content)
Initializes a new instance of the Text class. |
|
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. |
|
Text(Table table)
Initializes a new instance of the Text class. |
Method Summary | |
---|---|
org.w3c.dom.Element |
getDOMElement()
Gets a DOM representation of the pdf element. |
float |
getFirstLineIndent()
Gets a float value that indicates the indent of the first line in a text paragraph.The unit is point. |
float |
getRotatingAngle()
Gets a float value that indicates the number of degrees by which the text should be rotated anticlockwise when displayed or printed. |
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. |
float |
getTextWidth()
Gets a float value that indicates the width paragraph.The unit is point. |
boolean |
isAlignedByWord()
Gets a bool value that indicates whether the text is aligned by word. |
boolean |
isSpaced()
Gets a bool value that indicates whether the spaces at the begin of the text and returns in the text be shown. |
void |
setFirstLineIndent(float firstLineIndent)
Sets a float value that indicates the indent of the first line in a text paragraph.The unit is point. |
void |
setIsAlignedByWord(boolean alignedByWord)
Sets a bool value that indicates whether the text is aligned by word. |
void |
setIsSpaced(boolean isSpaced)
Sets a bool value that indicates whether the spaces at the begin of the text and returns in the text be shown. |
void |
setRotatingAngle(float angle)
Sets a float value that indicates the number of degrees by which the text should be rotated anticlockwise when displayed or printed. |
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. |
void |
setTextWidth(float width)
Sets a float value that indicates the width paragraph.The unit is point. |
Methods inherited from class com.aspose.pdf.elements.Paragraph |
---|
clone, getLeft, getMargin, getTop, isDisabled, isFirstParagraph, isKeptTogether, isOnOddPage, setDisabled, setFirstParagraph, setKeptTogether, setLeft, setMargin, setOnOddPage, setTop |
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 |
---|
public Text(Section section, java.lang.String content)
[SampleCode] Pdf pdf = new Pdf(); Section sec1 = pdf.getSections().add(); Text text1 = new Text(sec1,"seg1 "); sec1.getParagraphs().add(text1);
section
- The Text will inherit format info from the Section.public Text(Section section)
section
- The Text will inherit format info from the Section.public Text(HeaderFooter hf)
hf
- This constructor can inherit common property values from the specified HeaderFooter object.public Text(HeaderFooter hf, java.lang.String content)
hf
- This constructor can inherit common property values from the specified HeaderFooter object.content
- The content of the Textpublic Text(Table table)
table
- This constructor can inherit common property values(such as TextInfo) from the specified Table object.Method Detail |
---|
public TextInfo getTextInfo()
public void setTextInfo(TextInfo textInfo)
textInfo
- The TextInfo to set.public Segments getSegments()
public void setSegments(Segments segments)
segments
- The segments to set.public boolean isSpaced()
[SampleCode] Gets or sets a bool value that indicates whether the spaces at the begin of the text and returns in the text be shown. For the following XML:If IsSpaced is false, the result will be: The first line,The second line. If IsSpaced is true, the result will be: The first line, The second line. The first line, The second line.
public void setIsSpaced(boolean isSpaced)
public float getTextWidth()
public void setTextWidth(float width)
width
- The TextWidth to set.public float getFirstLineIndent()
public void setFirstLineIndent(float firstLineIndent)
firstLineIndent
- The m_firstLineIndent to set.public float getRotatingAngle()
public void setRotatingAngle(float angle)
angle
- The RotatingAngle to set.public boolean isAlignedByWord()
public void setIsAlignedByWord(boolean alignedByWord)
alignedByWord
- The IsAlignedByWord to set.public org.w3c.dom.Element getDOMElement() throws AsposeBaseException
PdfElementBase
getDOMElement
in class Paragraph
AsposeBaseException
PdfElementBase.getDOMElement()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |