|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectaspose.pdf.TextInfo
public class TextInfo
Encapsulates info for a Text
paragraph.
Typical usages are the following:
Note: The custom PostScript font used in the example is from Jonathan Paterson's Pipe-Dream font.
Constructor Summary | |
---|---|
TextInfo()
Initializes a new instance of the TextInfo class |
Method Summary | |
---|---|
java.lang.Object |
clone()
Clone a new TextInfo object. |
AlignmentType |
getAlignment()
Gets a AlignmentType that indicates the text alignment mode. |
Color |
getBackgroundColor()
Gets the background color of the text paragraph. |
float |
getCharSpace()
Gets a float value that indicates space between characters.The unit is point. |
Color |
getColor()
Gets a Color object that indicates the color of the text. |
java.lang.String |
getFontAfmFile()
Gets a string that indicates the name of custom AFM font file. |
java.lang.String |
getFontEncoding()
Gets a string that indicates the font encoding name. |
java.lang.String |
getFontEncodingFile()
Gets a string that indicates the name of font encoding file. |
java.lang.String |
getFontName()
get a String that indicates the text font name. |
java.lang.String |
getFontOutlineFile()
Gets a string that indicates the name of custom font outline file. |
java.lang.String |
getFontPfmFile()
Gets a string that indicates the name of custom PFM font file. |
float |
getFontSize()
Gets a float number that indicates the size of font. |
boolean |
getIsBaseline()
Gets a bool value that indicates whether the text is baseline. |
boolean |
getIsCapRoman()
Gets a bool value that indicates the Roman page number is Capital or lowercase, the default value is false which means lowercase. |
boolean |
getIsFontEmbeded()
Gets a bool value that indicates if the font is embedded. |
boolean |
getIsHyperlink()
Get a boolean value indicates whether it is a hyper link . |
boolean |
getIsOverline()
Gets a bool value that indicates whether the text is with overline. |
boolean |
getIsRightToLeft()
Gets a bool value that indicates whether the text is right-to-left aligned. |
boolean |
getIsRoman()
Gets a bool value that indicates whether Roman number is used. |
boolean |
getIsStrikeOut()
Gets a bool value that indicates whether the text is with strikeout. |
boolean |
getIsSubscript()
Judge a particular segment Whether it is a Suberscript Field or not |
boolean |
getIsSuperscript()
Judge a particular segment Whether it is a Superscript Field or not |
boolean |
getIsTrueTypeFontBold()
Gets a bool value that indicates whether the TrueType font is bold. |
boolean |
getIsTrueTypeFontItalic()
Gets a bool value that indicates whether the TrueType font is italic. |
boolean |
getIsUnderline()
Gets a bool value that indicates whether the text is with underline. |
boolean |
getIsUnicode()
Gets a bool value that indicates whether unicode is used. |
float |
getLineSpacing()
Gets a float value that indicates the spacing between two text lines.The unit is point. |
Color |
getOutlineColor()
Gets a Color object that indicates outline color of the text. |
float |
getOutlineWidth()
|
Text |
getPointText()
Get the point text object included in the text . |
RenderingMode |
getRenderingMode()
Gets an RenderingMode object that indicates the rendering mode of the text. |
BorderInfo |
getTextBorder()
Gets a BorderInfo object that indicates the text border. |
java.lang.String |
getTruetypeFontFileName()
Gets a string that indicates the truetype font file name. |
float |
getWordSpace()
Gets a float value that indicates space between words.The unit is point. |
boolean |
isSame(TextInfo info)
Compare with a TextInfo object to see if they are the same . |
void |
setAlignment(AlignmentType textAlign)
Sets a AlignmentType that indicates the text alignment mode. |
void |
setBackgroundColor(Color bgColor)
Sets the background color of the text paragraph. |
void |
setCharSpace(float textCharSpace)
Sets a float value that indicates space between characters.The unit is point. |
void |
setColor(Color textColor)
Set a Color object that indicates the color of the text. |
void |
setFontAfmFile(java.lang.String fontAfm)
Sets a string that indicates the name of custom AFM font file. |
void |
setFontEncoding(java.lang.String fontEnc)
Sets a string that indicates the font encoding name. |
void |
setFontEncodingFile(java.lang.String fontEncoding)
Set a string that indicates the name of font encoding file. |
void |
setFontName(java.lang.String textFontName)
set a String that indicates the text font name. |
void |
setFontOutlineFile(java.lang.String fontOutline)
Sets a string that indicates the name of custom font outline file. |
void |
setFontPfmFile(java.lang.String fontPfm)
Sets a string that indicates the name of custom PFM font file. |
void |
setFontSize(float textFontSize)
Set a float number that indicates the size of font. |
void |
setIsBaseline(boolean isTextBaseline)
Sets a bool value that indicates whether the text is baseline. |
void |
setIsCapRoman(boolean isCapRoman)
Sets a bool value that indicates the Roman page number is Capital or lowercase, the default value is false which means lowercase. |
void |
setIsFontEmbeded(boolean textIsFontEmbeded)
Sets a bool value that indicates if the font is embedded. |
void |
setIsHyperlink(boolean isHyperlink)
Set a boolean value indicates whether it is a hyper link . |
void |
setIsOverline(boolean overline)
Sets a bool value that indicates whether the text is with overline. |
void |
setIsRightToLeft(boolean isReversed)
Sets a bool value that indicates whether the text is right-to-left aligned. |
void |
setIsRoman(boolean isRoman)
Sets a bool value that indicates whether Roman number is used. |
void |
setIsStrikeOut(boolean strikeOut)
Set a bool value that indicates whether the text is with strikeout. |
void |
setIsSubscript(boolean isSubscript)
Judge a particular segment Whether it is a Suberscript Field or not |
void |
setIsSuperscript(boolean isSuperscript)
Judge a particular segment Whether it is a Superscript Field or not |
void |
setIsTrueTypeFontBold(boolean isTrueTypeBold)
Sets a bool value that indicates whether the TrueType font is bold. |
void |
setIsTrueTypeFontItalic(boolean isTrueTypeItalic)
Sets a bool value that indicates whether the TrueType font is italic. |
void |
setIsUnderline(boolean underline)
Sets a bool value that indicates whether the text is with underline. |
void |
setIsUnicode(boolean isUnicode)
Sets a bool value that indicates whether unicode is used. |
void |
setLineSpacing(float textLineSpace)
Sets a float value that indicates the spacing between two text lines.The unit is point. |
void |
setOutlineColor(Color outlineColor)
Set a Color object that indicates outline color of the text. |
void |
setOutlineWidth(float outlineWidth)
|
void |
setPointText(Text PointText)
Set the point text object included in the text . |
void |
setRenderingMode(RenderingMode renderingMode)
Sets an RenderingMode object that indicates the rendering mode of the text. |
void |
setTextBorder(BorderInfo textBorder)
Sets a BorderInfo object that indicates the text border. |
void |
setTruetypeFontFileName(java.lang.String truetypeFontFile)
Sets a string that indicates the truetype font file name. |
void |
setWordSpace(float textWordSpace)
Sets a float value that indicates space between words.The unit is point. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextInfo()
TextInfo
class
Method Detail |
---|
public java.lang.String getFontName()
Remarks:In Aspose.Pdf,three types of fonts is supported. The first type is base 14 font which are Courier,Courier-Bold,Courier-BoldOblique,Courier-Oblique,Helvetica,Helvetica-Bold,Helvetica-BoldOblique, Helvetica-Oblique,Symbol,Times-Bold,Times-BoldItalic,Times-Italic,Times-Roman and ZapfDingbats. Only font name are needed when using these fonts. The second type is postscript font. User should set the FontAfmFile or FontPfmFile,FontEncodingFile and FontOutlineFile if want to embed font. The last type is truetype font. User need to install the truetype font if it is not installed in the system. Truetype font with unicode is supported. TruetypeFontFileName should be set when unicode is used. We recommend that you use truetype font instead of postscript font becouse some type of postscript fonts are not supported.
public void setFontName(java.lang.String textFontName)
textFontName
- public java.lang.String getFontEncoding()
public void setFontEncoding(java.lang.String fontEnc)
fontEnc
- public boolean getIsUnicode()
public void setIsUnicode(boolean isUnicode)
isUnicode
- public boolean getIsFontEmbeded()
public void setIsFontEmbeded(boolean textIsFontEmbeded)
textIsFontEmbeded
- public float getFontSize()
public void setFontSize(float textFontSize)
textFontSize
- the value of the font sizepublic boolean getIsTrueTypeFontBold()
Remarks: Valid for TrueType fonts only.
public void setIsTrueTypeFontBold(boolean isTrueTypeBold)
Remarks: Valid for TrueType fonts only.
isTrueTypeBold
- public boolean getIsTrueTypeFontItalic()
Remarks: Valid for TrueType fonts only.
public void setIsTrueTypeFontItalic(boolean isTrueTypeItalic)
Remarks: Valid for TrueType fonts only.
isTrueTypeItalic
- public java.lang.String getFontAfmFile()
Remarks: Valid for custom PostScript fonts only.
You need to assign either FontAfmFile
or FontPfmFile
If both are assigned FontAfmFile
will be evaluated first.
public void setFontAfmFile(java.lang.String fontAfm)
Remarks: Valid for custom PostScript fonts only.
You need to assign either FontAfmFile
or FontPfmFile
If both are assigned FontAfmFile
will be evaluated first.
fontAfm
- public java.lang.String getFontPfmFile()
Remarks:Valid for custom PostScript fonts only.
You need to assign either FontAfmFile
or FontPfmFile
.
If both are assigned FontAfmFile
will be evaluated first.
public void setFontPfmFile(java.lang.String fontPfm)
Remarks:Valid for custom PostScript fonts only.
You need to assign either FontAfmFile
or FontPfmFile
.
If both are assigned FontAfmFile
will be evaluated first.
fontPfm
- public java.lang.String getFontOutlineFile()
Remarks: Valid for custom PostScript fonts only.
public void setFontOutlineFile(java.lang.String fontOutline)
Remarks: Valid for custom PostScript fonts only.
fontOutline
- public java.lang.String getFontEncodingFile()
Remarks: Valid for custom PostScript fonts only.
public void setFontEncodingFile(java.lang.String fontEncoding)
fontEncoding
- the name of encoding filepublic boolean getIsBaseline()
public void setIsBaseline(boolean isTextBaseline)
isTextBaseline
- public AlignmentType getAlignment()
AlignmentType
that indicates the text alignment mode. This property
should be set for the Text object but not Segment object.
public void setAlignment(AlignmentType textAlign)
AlignmentType
that indicates the text alignment mode. This property
should be set for the Text object but not Segment object.
textAlign
- public boolean getIsUnderline()
public void setIsUnderline(boolean underline)
underline
- public boolean getIsOverline()
public void setIsOverline(boolean overline)
overline
- public boolean getIsStrikeOut()
public void setIsStrikeOut(boolean strikeOut)
strikeOut
- true or falsepublic float getCharSpace()
public void setCharSpace(float textCharSpace)
textCharSpace
- public float getWordSpace()
public void setWordSpace(float textWordSpace)
textWordSpace
- public RenderingMode getRenderingMode()
RenderingMode
object that indicates the rendering mode of the text.
public void setRenderingMode(RenderingMode renderingMode)
RenderingMode
object that indicates the rendering mode of the text.
renderingMode
- public Color getColor()
Color
object that indicates the color of the text.
public void setColor(Color textColor)
Color
object that indicates the color of the text.
textColor
- the color object to be usedpublic Color getOutlineColor()
Color
object that indicates outline color of the text.
public void setOutlineColor(Color outlineColor)
Color
object that indicates outline color of the text.
outlineColor
- the color object to be usedpublic float getOutlineWidth()
public void setOutlineWidth(float outlineWidth)
public Color getBackgroundColor()
public void setBackgroundColor(Color bgColor)
bgColor
- public float getLineSpacing()
public void setLineSpacing(float textLineSpace)
textLineSpace
- public java.lang.String getTruetypeFontFileName()
public void setTruetypeFontFileName(java.lang.String truetypeFontFile)
truetypeFontFile
- public BorderInfo getTextBorder()
BorderInfo
object that indicates the text border. This property should be set
to Text object but not segment object.
public void setTextBorder(BorderInfo textBorder)
BorderInfo
object that indicates the text border. This property should be set
to Text object but not segment object.
textBorder
- public boolean getIsRightToLeft()
public void setIsRightToLeft(boolean isReversed)
public boolean getIsHyperlink()
public void setIsHyperlink(boolean isHyperlink)
public boolean getIsSuperscript()
public void setIsSuperscript(boolean isSuperscript)
public boolean getIsSubscript()
public void setIsSubscript(boolean isSubscript)
public Text getPointText()
public void setPointText(Text PointText)
public boolean getIsRoman()
public void setIsRoman(boolean isRoman)
public boolean getIsCapRoman()
public void setIsCapRoman(boolean isCapRoman)
public java.lang.Object clone()
TextInfo
object.
clone
in class java.lang.Object
TextInfo
object.public boolean isSame(TextInfo info)
info
- the TextInfo object to be compared
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |