FoxitPDFSDKforWeb  8.5.0
Foxit PDF SDK for Web
TextObject Class Reference
Inheritance diagram for TextObject:
GraphicsObject

Public Member Functions

 getFontInfo ()
 Get the text content from this text object. More...
 
 getFontSize ()
 Get the font size of this text object. More...
 
 getText ()
 Get the text content from this text object. More...
 
 isBold ()
 Check if the text object use bold font. More...
 
 isItalic ()
 Check if the text object use italic font. More...
 
 setBold (bold)
 Make the current font of the text object to be bold. More...
 
 setFontByName (name, styles, charset)
 Set the font by name to the this text object. More...
 
 setFontSize (size)
 Set the font size of this text object. More...
 
 setItalic (italic)
 Make the current font of the text object to be italic. More...
 
 setStandardFont (id)
 Set the standard font to the this text object. More...
 
 setText (char)
 Set the text content to this text object. More...
 
- Public Member Functions inherited from GraphicsObject
 getBitmap (scale, rotation=0, type='canvas')
 Render graphics object. More...
 
 getBorderColor ()
 Get the border color of this graphics object, for path object. More...
 
 getBorderDashes ()
 Get the dash array of this graphics object, for path object. More...
 
 getBorderStyle ()
 Get the border style of this path object, dash or solid. More...
 
 getBorderWidth ()
 Get the border width of this graphics object, for path object. More...
 
 getDeviceMatrix ()
 Get the device matrix of this graphics object, in device coordinate. More...
 
 getFillColor ()
 Get the fill color of this graphics object, for path object. More...
 
 getId ()
 Get the identity string of this graphics object. More...
 
 getMatrix ()
 Get the matrix of this graphics object, in PDF coordinate. More...
 
 getOpacity ()
 Get the opacity of this graphics object. More...
 
 getPDFPage ()
 Get the associated pdf page of this graphics object. More...
 
 getRect ()
 Get the rectangle of this graphics object. More...
 
 getType ()
 Get the type of this graphics object. More...
 
 moveToPosition (type, graphicObj)
 Sets the position of this graphics object. More...
 
 setBorderColor (value)
 Set the border color of this graphics object, for path object. More...
 
 setBorderStyle (value, dashes)
 Set the border style of this graphics object, for path object. More...
 
 setBorderWidth (value)
 Set the border width of this graphics object, for path object. More...
 
 setFillColor (value)
 Set the fill color of this graphics object, for path object. More...
 
 setMatrix (matrix)
 Set the matrix of this graphics object. More...
 
 setOpacity (value)
 Set the fill color of this graphics object. More...
 
 setRect (rect)
 Set the rectangle of this graphics object, move it to the specified rectangle. More...
 

Detailed Description

PDF text object

Member Function Documentation

◆ getFontInfo()

TextObject::getFontInfo ( )
inline

Get the text content from this text object.

Returns
{font info} - The font information, please refer to PDFPage::addGraphicsObject for more details.
Since
7.4.0

◆ getFontSize()

TextObject::getFontSize ( )
inline

Get the font size of this text object.

Parameters
{number}- The font size.
Since
7.4.0

◆ getText()

TextObject::getText ( )
inline

Get the text content from this text object.

Returns
{string} - The text content.
Since
7.4.0

◆ isBold()

TextObject::isBold ( )
inline

Check if the text object use bold font.

Returns
{boolean} - true if it's bold, otherwise false.
Since
7.4.0

◆ isItalic()

TextObject::isItalic ( )
inline

Check if the text object use italic font.

Returns
{boolean} - true if it's italic, otherwise false.
Since
7.4.0

◆ setBold()

TextObject::setBold (   bold)
inline

Make the current font of the text object to be bold.

Parameters
{boolean}- true if it's bold, otherwise false.
Since
7.4.0

◆ setFontByName()

TextObject::setFontByName (   name,
  styles,
  charset 
)
inline

Set the font by name to the this text object.

Parameters
{string}- The font face name.
{styles}- The font style. Please refer to Font_Styles .
{charset}- The charset of the font. Please refer to Font_Charset or Font_CIDCharset .
Since
7.4.0

◆ setFontSize()

TextObject::setFontSize (   size)
inline

Set the font size of this text object.

Returns
{number} - The font size.
Since
7.4.0

◆ setItalic()

TextObject::setItalic (   italic)
inline

Make the current font of the text object to be italic.

Parameters
{boolean}- true if it's italic, otherwise false.
Since
7.4.0

◆ setStandardFont()

TextObject::setStandardFont (   id)
inline

Set the standard font to the this text object.

Parameters
{number}- The font id. Please refer to Font_StandardID .
Since
7.4.0

◆ setText()

TextObject::setText (   char)
inline

Set the text content to this text object.

Parameters
{string}- The text content.
Since
7.4.0

Foxit Software Corporation Logo
@2022 Foxit Software Incorporated. All rights reserved.