public class Text extends Paragraph
Represents a text Paragraph
in a Pdf document.
[Java] Pdf pdf1 = new Pdf(); pdf1.getPageSetup().setPageHeight ( PageSize.A2Height); Section sec1 = pdf1.getSections().add(); Text text1 = new Text(sec1,"this is text content"); text1.getMargin().setTop ( 30); sec1.getParagraphs().add(text1); pdf1.save(...); [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <Section PageHeight="1684"> <Text MarginTop="30"> <Segment>this is text content</Segment> </Text> </Section> </Pdf>
Modifier and Type | Field and Description |
---|---|
float |
FirstLineIndent
Gets or sets an float value that indicates the indent of the first line in a text paragraph.The unit
is point.
|
boolean |
IfHtmlTagSupportedCssWinsOnFirstLevelChildren
For historical reasons in HTML to PDF conversion
children of first level that created during HTML to PDF conversion inherites main font properties from parent textbox,
this parameters allows to set it to TRUE and take values from CSS even for first level children
|
boolean |
IfHtmlTagSupportedOverwrightHtmlFontNames |
boolean |
IfHtmlTagSupportedOverwrightHtmlFontSizes |
com.aspose.ms.System.Drawing.Color |
InlineRadioButtonBackgroundColor
Gets or sets a
System.Drawing.Color object that indicates the color of the inlineRadiobutton's background. |
com.aspose.ms.System.Drawing.Color |
InlineRadioButtonColor
Gets or sets a
System.Drawing.Color object that indicates the color of the inline radio button. |
String |
InlineRadioButtonFieldName
Gets or sets a string that indicates the name of inlineRadioButton's the field.
|
boolean |
IsAlignedByWord
Gets or sets a bool value that indicates whether the text is aligned by word.
|
boolean |
IsAutoHyphenated
Gets or sets a bool value that indicates whehter the text is hyphenated automatically.
|
boolean |
IsFitToPage
Gets or sets a bool value that indicates whether the paragraph need to be placed on single page.
|
boolean |
IsHtml5Supported
Gets or sets a bool value that indicates whether the HTML 5 tags in text is supported.
|
boolean |
IsHtmlTagSupported
Gets or sets a bool value that indicates whether the HTML tags in text is supported.
|
boolean |
IsNeedRepeating
Gets or sets a bool value that indicates whether the paragraph need to be repeated on next page.
|
boolean |
IsSpaced
Gets or sets a bool value that indicates whether the spaces at the begin of the text and returns in
the text be shown.
|
boolean |
IsSvgEmbedded
Gets or sets a bool value that indicates whether SVG areas supported.
|
boolean |
IsWidowOrphanControlEnabled
Gets or sets a bool value that indicates whether the Widow/Orphan control is enabled.
|
float |
Opacity
Gets or sets a float value between 0.0 and 1.0 that indicates the opacity of the text.
|
float |
RotatingAngle
Gets or sets a float value that indicates the number of degrees by which the text should be
rotated anticlockwise when displayed or printed.
|
Segments |
Segments
Gets or sets a
Segments collection that indicates all segments in the text paragraph. |
TabStops |
TabStops
Gets or sets a
TabStops that indicates the tab stop positions in the
text paragraph. |
float |
TextWidth
Gets or sets a float value that indicates the width paragraph.The unit is point.
|
boolean |
UseTextInfoStyle
Gets or sets a bool value that indicates whether to use style from TextInfo
|
int |
WrapLines
Gets or sets a maximum count of wrapped lines in text.
|
int |
ZIndex
Gets or sets a int value that indicates the Z-order of the text.
|
_PositioningType, FixedHeight, FixedWidth, ID, IsDisabled, IsFirstParagraph, IsFirstParagraphInColumn, IsInList, IsKeptTogether, IsKeptWithNext, IsOnOddPage, Left, Margin, ReferenceParagraphID, Top
Constructor and Description |
---|
Text()
Initializes a new instance of the
Text class. |
Text(HeaderFooter hf)
Initializes a new instance of the
Text class. |
Text(HeaderFooter hf,
String content)
Initializes a new instance of the
Text class. |
Text(Section section)
Initializes a new instance of the
Text class. |
Text(Section section,
String content)
Initializes a new instance of the
Text class. |
Text(String content)
Initializes a new instance of the
Text class. |
Text(String content,
TextInfo info)
Initializes a new instance of the
Text class. |
Modifier and Type | Method and Description |
---|---|
Object |
completeClone()
Clones a new
Text object. |
Object |
deepClone()
Clones a new
Text object. |
int |
getInlineRadioButtonCheckedIndex()
Gets or sets a int value that indicates the index of the inlineRadioButton that has been checked.
|
TextInfo |
getTextInfo()
Gets or sets a
TextInfo object that indicates the text info of the text paragraph. |
void |
setFontSizeForTextualChildren(float newFontSize) |
void |
setInlineRadioButtonCheckedIndex(int value) |
void |
setTextInfo(TextInfo value) |
void |
setTextNameForTextualChildren(String newFontName) |
copyTo, getBookmarked, setBookmarked
load
public boolean IfHtmlTagSupportedCssWinsOnFirstLevelChildren
For historical reasons in HTML to PDF conversion children of first level that created during HTML to PDF conversion inherites main font properties from parent textbox, this parameters allows to set it to TRUE and take values from CSS even for first level children
public float Opacity
Gets or sets a float value between 0.0 and 1.0 that indicates the opacity of the text. The default value is 1.0.
public boolean IsAutoHyphenated
Gets or sets a bool value that indicates whehter the text is hyphenated automatically.
public TabStops TabStops
Gets or sets a TabStops
that indicates the tab stop positions in the
text paragraph.
public Segments Segments
Gets or sets a Segments
collection that indicates all segments in the text paragraph.
public float FirstLineIndent
Gets or sets an float value that indicates the indent of the first line in a text paragraph.The unit is point.
public boolean IsSpaced
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:
<Text> <Segment>The first line, The second line.</Segment> </Text>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.
public boolean IsSvgEmbedded
Gets or sets a bool value that indicates whether SVG areas supported.
public boolean IsWidowOrphanControlEnabled
Gets or sets a bool value that indicates whether the Widow/Orphan control is enabled. Default is true. If it is true, Widow/Orphan control is enabled and Widows/orphans themselves are eliminated (disabled).
public boolean IsAlignedByWord
Gets or sets a bool value that indicates whether the text is aligned by word. This property should be set to false when using Asian language such as chinese.
public float TextWidth
Gets or sets a float value that indicates the width paragraph.The unit is point.
public float RotatingAngle
Gets or sets a float value that indicates the number of degrees by which the text should be rotated anticlockwise when displayed or printed. Default value is 0.
[Java] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.getSections().add(); Text t1 = new Text("Hello world"); t1.setPositioningType ( PositioningType.PageRelative); t1.setTop ( 200); t1.setLeft ( 100); t1.setRotatingAngle ( 30); sec1.getParagraphs().add(t1); pdf1.save("e:/temp/test.pdf"); [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf" CompressionLevel="0"> <Section> <Text RotatingAngle="30" Left="100" Top="200" PositioningType="PageRelative"> <Segment>Hello world</Segment> </Text> </Section> </Pdf>
public int WrapLines
Gets or sets a maximum count of wrapped lines in text. All lines over this value will be cutted. Default value is 0 (text is uncutted).
public boolean IsFitToPage
Gets or sets a bool value that indicates whether the paragraph need to be placed on single page. Default value is false.The attribute is only valid when the paragraph is the first paragraph on a page;
public boolean IsNeedRepeating
Gets or sets a bool value that indicates whether the paragraph need to be repeated on next page. Default value is false.The attribute is only valid when the paragraph itself and the object its ReferenceParagraphID referred to both are included in RepeatingRows.
public boolean IsHtmlTagSupported
Gets or sets a bool value that indicates whether the HTML tags in text is supported. Default is false.
public boolean UseTextInfoStyle
Gets or sets a bool value that indicates whether to use style from TextInfo
public boolean IsHtml5Supported
Gets or sets a bool value that indicates whether the HTML 5 tags in text is supported. Default is false.
public boolean IfHtmlTagSupportedOverwrightHtmlFontNames
public boolean IfHtmlTagSupportedOverwrightHtmlFontSizes
public String InlineRadioButtonFieldName
Gets or sets a string that indicates the name of inlineRadioButton's the field. Note that each field MUST have a unique name.
public com.aspose.ms.System.Drawing.Color InlineRadioButtonBackgroundColor
Gets or sets a System.Drawing.Color
object that indicates the color of the inlineRadiobutton's background.
public com.aspose.ms.System.Drawing.Color InlineRadioButtonColor
Gets or sets a System.Drawing.Color
object that indicates the color of the inline radio button.
public int ZIndex
Gets or sets a int value that indicates the Z-order of the text. A text with larger ZIndex will be placed over the paragraphs with smaller ZIndex. ZIndex can be negative. Text with negative ZIndex will be placed behind the text in the page.
public Text()
Initializes a new instance of the Text
class.
public Text(String content)
Initializes a new instance of the Text
class.
content
- The content of the first segment of the text.public Text(String content, TextInfo info)
Initializes a new instance of the Text
class.
content
- The content of the first segment of the text.info
- The text format info of the first segment of the text.public Text(Section section)
Initializes a new instance of the Text
class.
section
- The specified Section
object.
Section
object.
public Text(Section section, String content)
Initializes a new instance of the Text
class.
section
- The specified Section
object.content
- The content of the first segment of the text.
Section
object.
public Text(HeaderFooter hf)
Initializes a new instance of the Text
class.
hf
- The specified HeaderFooter
object.
HeaderFooter
object.
public Text(HeaderFooter hf, String content)
Initializes a new instance of the Text
class.
hf
- The specified HeaderFooter
object.content
- The content of the first segment of the text.
HeaderFooter
object.
public TextInfo getTextInfo()
Gets or sets a TextInfo
object that indicates the text info of the text paragraph.
public void setTextInfo(TextInfo value)
public Object deepClone()
Clones a new Text
object. Only format info of the text is cloned.
Text
objectpublic Object completeClone()
Clones a new Text
object. both format info and content of the text is cloned.
completeClone
in class Paragraph
Text
objectpublic int getInlineRadioButtonCheckedIndex()
Gets or sets a int value that indicates the index of the inlineRadioButton that has been checked.
public void setInlineRadioButtonCheckedIndex(int value)
public void setTextNameForTextualChildren(String newFontName)
public void setFontSizeForTextualChildren(float newFontSize)
Copyright © 2014 Aspose. All Rights Reserved.