public class Text extends Paragraph implements ITextContainer
Represents a text Paragraph
in a Pdf document.
[C#] Pdf pdf1 = new Pdf(); pdf1.PageSetup.PageHeight = PageSize.A2Height; Section sec1 = pdf1.Sections.Add(); Text text1 = new Text(sec1,"this is text content"); text1.Margin.Top = 30; sec1.Paragraphs.Add(text1); pdf1.Save(...); [Visual Basic] Dim pdf1 As Pdf = New Pdf() pdf1.PageSetup.PageHeight = PageSize.A2Height Dim sec1 As Section = pdf1.Sections.Add() Dim text1 As Text = New Text(sec1, "this is text content") text1.Margin.Top = 30 sec1.Paragraphs.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>
Paragraph.VerticalPositionInfo
absolutePosX, absolutePosY, ClippingArea, FixedHeight, FixedWidth, isAbsoluteLayout, isFixedLayout, IsNeedAddToPage, IsPositionGot, IsPositionProcessed, isRelativeLayout, MayNeedReprocess, NextParagraph, posBottom, posLeft, posRight, posTop, RefPara, relativePosX, relativePosY, VerticalPosInfo
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. |
float |
getAdditionalHeightForRotating() |
aspose.pdf.general.composer.ContentComposer |
getComposer() |
float |
getCurrentFootNoteHeight()
get or set a float value that indicates the total height of all
footnotes the current Text has.
|
int |
getDisplayType()
Gets or sets a css display type if paragraph was created from html
content.
|
float |
getFirstLineIndent()
Gets or sets an float value that indicates the indent of the first
line in a text paragraph.The unit is point.
|
FormField |
getformfield()
Gets or sets a FormField object that indicates the FormField this
Text contains.
|
GraphicState |
getGraphicState()
Gets or sets a object that indicates the graphic state for this text.
|
boolean |
getIfHtmlTagSupportedCssWinsOnFirstLevelChildren()
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
|
Color |
getInlineRadioButtonBackgroundColor() |
com.aspose.ms.System.Drawing.Color |
getInlineRadioButtonBackgroundColorInternal() |
int |
getInlineRadioButtonCheckedIndex()
Gets or sets a int value that indicates the index of the
inlineRadioButton that has been checked.
|
Color |
getInlineRadioButtonColor() |
com.aspose.ms.System.Drawing.Color |
getInlineRadioButtonColorInternal() |
String |
getInlineRadioButtonFieldName()
Gets or sets a string that indicates the name of inlineRadioButton's
the field.
|
Segment |
getLastSegmentIfAny()
Handy method of getting last segment or null if no segments yet
|
float |
getOpacity()
Gets or sets a float value between 0.0 and 1.0 that indicates the
opacity of the text.
|
float |
getRotatingAngle()
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 |
getSegments()
Gets or sets a
Segments collection that indicates all
segments in the text paragraph. |
TabStops |
getTabStops()
Gets or sets a
TabStops that indicates the tab stop positions
in the text paragraph. |
float |
getTextHeight(Pdf doc,
float width)
Get the height of a text paragraph.
|
TextInfo |
getTextInfo()
Gets or sets a
TextInfo object that indicates the text info
of the text paragraph. |
float |
getTextWidth()
Gets or sets a float value that indicates the width paragraph.The
unit is point.
|
boolean |
getUseTextInfoStyle()
Gets or sets a bool value that indicates whether to use style from
TextInfo
|
int |
getWrapLines()
Gets or sets a maximum count of wrapped lines in text.
|
int |
getZIndex()
Gets or sets a int value that indicates the Z-order of the text.
|
boolean |
hasFootNote()
get or set a bool value that indicates if the current Text has
footnote.
|
void |
hasFootNote(boolean value) |
boolean |
hasInline()
If the text has inline paragraph.
|
boolean |
hasInlineImage()
If the text has inline Image paragraph.
|
boolean |
hasInlineRadioButton()
If the text has inline radio paragraph.
|
boolean |
hasRightToLeftSeg()
If the text has right-to-left segment
|
boolean |
hasSplitedSegment()
If the text has segment splited from large ones.
|
boolean |
hasTABSymbol() |
boolean |
isAlignedByWord()
Gets or sets a bool value that indicates whether the text is aligned
by word.
|
void |
isAlignedByWord(boolean value) |
boolean |
isAutoHyphenated()
Gets or sets a bool value that indicates whehter the text is
hyphenated automatically.
|
void |
isAutoHyphenated(boolean value) |
boolean |
isEmpty() |
boolean |
isFitToPage()
Gets or sets a bool value that indicates whether the paragraph need
to be placed on single page.
|
void |
isFitToPage(boolean value) |
boolean |
isHtml5Supported()
Gets or sets a bool value that indicates whether the HTML 5 tags in
text is supported.
|
void |
isHtml5Supported(boolean value) |
boolean |
isHtmlTagSupported()
Gets or sets a bool value that indicates whether the HTML tags in
text is supported.
|
void |
isHtmlTagSupported(boolean value) |
boolean |
isNeedRepeating()
Gets or sets a bool value that indicates whether the paragraph need
to be repeated on next page.
|
void |
isNeedRepeating(boolean value) |
boolean |
isRealRTLText() |
void |
isRealRTLText(boolean value) |
boolean |
isSimpleSegment()
Indicates whether the text is SimpleSegment or not.
|
void |
isSimpleSegment(boolean value) |
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.
|
void |
isSpaced(boolean value) |
boolean |
isSvgEmbedded()
Gets or sets a bool value that indicates whether SVG areas supported.
|
void |
isSvgEmbedded(boolean value) |
boolean |
isSymbolProcessed() |
void |
isSymbolProcessed(boolean IsSymbolProcessed) |
boolean |
isWidowOrphanControlEnabled()
Gets or sets a bool value that indicates whether the Widow/Orphan
control is enabled.
|
void |
isWidowOrphanControlEnabled(boolean value) |
void |
setBackupFirstLineIndent(float value) |
void |
setCurrentFootNoteHeight(float value) |
void |
setDisplayType(int value) |
void |
setFirstLineIndent(float value) |
void |
setFontSizeForTextualChildren(float newFontSize) |
void |
setformfield(FormField value) |
void |
setIfHtmlTagSupportedCssWinsOnFirstLevelChildren(boolean value) |
void |
setInlineRadioButtonBackgroundColor(Color value) |
void |
setInlineRadioButtonBackgroundColorInternal(com.aspose.ms.System.Drawing.Color value) |
void |
setInlineRadioButtonCheckedIndex(int value) |
void |
setInlineRadioButtonColor(Color value) |
void |
setInlineRadioButtonColorInternal(com.aspose.ms.System.Drawing.Color value) |
void |
setInlineRadioButtonFieldName(String value) |
void |
setOpacity(float value) |
void |
setRotatingAngle(float value) |
void |
setSegments(Segments value) |
void |
setTabStops(TabStops value) |
void |
setTextInfo(TextInfo value) |
void |
setTextNameForTextualChildren(String newFontName) |
void |
setTextWidth(float value) |
void |
setUseTextInfoStyle(boolean value) |
void |
setWrapLines(int value) |
void |
setZIndex(int value) |
copyTo, getBookmarked, getFootNoteProcessed, getHeight, getID, getLeft, getMargin, getNeedReprocess, getNextParagraphInHeading, getPageNumber, getParentCell, getPositioningType, getPosX, getPosY, getRealPageNumber, getReferencedParagraphWidth, getReferenceParagraphID, getRefPageNumber, getSection, getTop, getWidth, isDisabled, isDisabled, isEndNote, isFirstParagraph, isFirstParagraph, isFirstParagraphInColumn, isFirstParagraphInColumn, isFootNote, isFootNote, isInHeaderFooter, isInHeaderFooter, isInList, isInList, isKeptTogether, isKeptTogether, isKeptWithNext, isKeptWithNext, isOnOddPage, isOnOddPage, setBookmarked, setFootNoteProcessed, setHeight, setID, setLeft, setMargin, setNeedReprocess, setNextParagraphInHeading, setPageNumber, setParentCell, setParentIsTable, setPositioningType, setPosX, setPosY, setRealPageNumber, setReferencedParagraphWidth, setReferenceParagraphID, setRefPageNumber, setSection, setTop, setWidth
public boolean IsWidowOrphanControlSet
public TabLeaders TabLeaders
public float FloatingBoxHeight
public float FloatingBoxWidth
public float FloatingBoxPosX
public float FloatingBoxPosY
public float FloatingBoxMarginLeft
public float FloatingBoxMarginRight
public float FloatingBoxMarginTop
public boolean IsSubstitutionNeed
public boolean isNPSymbol
public boolean isNCSymbol
public boolean ifHtmlTagSupportedOverwriteHtmlFontNames
Textblock's content can be processed as HTML if isHtmlTagSupported property set as 'true'. This boolean property indicates whether font names of text-segments created during parsing of that HTML will be forcibly replaced with font name taken from TextInfo of textblock that contains that HTML.
public boolean ifHtmlTagSupportedOverwriteHtmlFontSizes
Textblock's content can be processed as HTML if IsHtmlTagSupported property set as 'true'. This boolean property indicates whether font size of text-segments created during parsing of that HTML will be forcibly replaced with font size taken from TextInfo of textblock that contains that HTML.
public boolean isMarinForBorderAdded
public float FirstLineHeight
public float LastLineHeight
public boolean IsLongWordProcessed
public TextLines TextLines
�����д��������һϵ�е�TextLine����
public Segments bakSegments
public boolean IsSegmentsReversed
public float ShowLengthOfRotateText
public int HowManyLinesOfRotateText
public float LineHeightOfRotateText
public float RealWidthOfRotateText
public int BakAlignmentOfRotateText
public boolean HasNonBreakSpace
public int customStopAlignmentType
public boolean IsRtlSegmentModeProcessed
public boolean IsAutoFontAdjustProcessed
public boolean IsMacroReProcessed
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 boolean getIfHtmlTagSupportedCssWinsOnFirstLevelChildren()
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 void setIfHtmlTagSupportedCssWinsOnFirstLevelChildren(boolean value)
public GraphicState getGraphicState()
Gets or sets a object that indicates the graphic state for this text.
GraphicState
public float getOpacity()
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 void setOpacity(float value)
public boolean isAutoHyphenated()
Gets or sets a bool value that indicates whehter the text is hyphenated automatically.
public void isAutoHyphenated(boolean value)
public boolean hasFootNote()
get or set a bool value that indicates if the current Text has footnote.
public void hasFootNote(boolean value)
public float getCurrentFootNoteHeight()
get or set a float value that indicates the total height of all footnotes the current Text has. the default value is 0.
public void setCurrentFootNoteHeight(float value)
public TextInfo getTextInfo()
Gets or sets a TextInfo
object that indicates the text info
of the text paragraph.
public void setTextInfo(TextInfo value)
public TabStops getTabStops()
Gets or sets a TabStops
that indicates the tab stop positions
in the text paragraph.
public void setTabStops(TabStops value)
public Segments getSegments()
Gets or sets a Segments
collection that indicates all
segments in the text paragraph.
public void setSegments(Segments value)
public Segment getLastSegmentIfAny()
Handy method of getting last segment or null if no segments yet
public float getFirstLineIndent()
Gets or sets an float value that indicates the indent of the first line in a text paragraph.The unit is point.
public void setFirstLineIndent(float value)
public void setBackupFirstLineIndent(float value)
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 void isSpaced(boolean value)
public boolean isSvgEmbedded()
Gets or sets a bool value that indicates whether SVG areas supported.
public void isSvgEmbedded(boolean value)
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 void isWidowOrphanControlEnabled(boolean value)
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 void isAlignedByWord(boolean value)
public float getTextWidth()
Gets or sets a float value that indicates the width paragraph.The unit is point. //zyqw:�����
public void setTextWidth(float value)
public float getRotatingAngle()
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.
[C#] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.Sections.Add(); Text t1 = new Text("Hello world"); t1.PositioningType = PositioningType.PageRelative; t1.Top = 200; t1.Left = 100; t1.RotatingAngle = 30; sec1.Paragraphs.Add(t1); pdf1.Save("e:/temp/test.pdf"); [VisualBasic] Dim pdf1 As Pdf = New Pdf() Dim sec1 As Section = pdf1.Sections.Add() Dim t1 As Text = New Text("Hello world") t1.PositioningType = PositioningType.PageRelative t1.Top = 200 t1.Left = 100 t1.RotatingAngle = 30 sec1.Paragraphs.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 void setRotatingAngle(float value)
public int getWrapLines()
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 void setWrapLines(int value)
public aspose.pdf.general.composer.ContentComposer getComposer()
getComposer
in class Paragraph
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 void isFitToPage(boolean value)
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 void isNeedRepeating(boolean value)
public Object completeClone()
Clones a new Text
object. both format info and content of the
text is cloned.
completeClone
in class Paragraph
Text
objectpublic Object deepClone()
Clones a new Text
object. Only format info of the text is
cloned.
Text
objectpublic float getTextHeight(Pdf doc, float width)
Get the height of a text paragraph.
doc
- The Pdf
object.width
- The width of the text paragraph. public boolean isHtmlTagSupported()
Gets or sets a bool value that indicates whether the HTML tags in text is supported. Default is false.
public void isHtmlTagSupported(boolean value)
public boolean getUseTextInfoStyle()
Gets or sets a bool value that indicates whether to use style from TextInfo
public void setUseTextInfoStyle(boolean value)
public boolean isHtml5Supported()
Gets or sets a bool value that indicates whether the HTML 5 tags in text is supported. Default is false.
public void isHtml5Supported(boolean value)
public boolean isSymbolProcessed()
public void isSymbolProcessed(boolean IsSymbolProcessed)
public boolean hasInline()
If the text has inline paragraph.
public boolean isEmpty()
public String getInlineRadioButtonFieldName()
Gets or sets a string that indicates the name of inlineRadioButton's the field. Note that each field MUST have a unique name.
public void setInlineRadioButtonFieldName(String value)
public 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 com.aspose.ms.System.Drawing.Color getInlineRadioButtonBackgroundColorInternal()
public Color getInlineRadioButtonBackgroundColor()
public void setInlineRadioButtonBackgroundColorInternal(com.aspose.ms.System.Drawing.Color value)
public void setInlineRadioButtonBackgroundColor(Color value)
public com.aspose.ms.System.Drawing.Color getInlineRadioButtonColorInternal()
public Color getInlineRadioButtonColor()
public void setInlineRadioButtonColorInternal(com.aspose.ms.System.Drawing.Color value)
public void setInlineRadioButtonColor(Color value)
public FormField getformfield()
Gets or sets a FormField object that indicates the FormField this Text contains.
public void setformfield(FormField value)
public boolean hasInlineRadioButton()
If the text has inline radio paragraph.
public float getAdditionalHeightForRotating()
public boolean hasInlineImage()
If the text has inline Image paragraph.
public boolean hasTABSymbol()
public boolean isSimpleSegment()
Indicates whether the text is SimpleSegment or not.
public void isSimpleSegment(boolean value)
public boolean isRealRTLText()
public void isRealRTLText(boolean value)
public boolean hasSplitedSegment()
If the text has segment splited from large ones.
public boolean hasRightToLeftSeg()
If the text has right-to-left segment
public int getZIndex()
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 void setZIndex(int value)
public int getDisplayType()
Gets or sets a css display type if paragraph was created from html content.
public void setDisplayType(int value)
public void setTextNameForTextualChildren(String newFontName)
setTextNameForTextualChildren
in interface ITextContainer
public void setFontSizeForTextualChildren(float newFontSize)
setFontSizeForTextualChildren
in interface ITextContainer
Copyright © 2016 Aspose. All Rights Reserved.