FoxitPDFSDKforWeb v10.0.0
Foxit PDF SDK for Web
TypingInkSignImageGenerator Class Reference

An ink signature image generator that generates image data url from specific text content and font. This class provides importFontFamily API to import thirdparty fonts globally from remote what you needed. More...

Public Member Functions

 constructor (content='')
 
 generateImage (width=114, height=57)
 Generate typing ink signature image and transfromed into data url. More...
 
 getFontFamily ()
 Returns current font name. More...
 
 getFontSize ()
 Returns current font size. More...
 
 importFontFamily (fontFamily, uri)
 Import thirdparty font from specific url globally via -face rule in css. More...
 
 setContent (content)
 Update the text content, it takes effect while calling the generateImage method next time. More...
 
 setFontFamily (fontFamily)
 Update the font name, it takes effect while calling the generateImage method next time. More...
 
 setFontSize (fontSize)
 Update the font size, it takes effect while calling the generateImage method next time. More...
 

Detailed Description

An ink signature image generator that generates image data url from specific text content and font. This class provides importFontFamily API to import thirdparty fonts globally from remote what you needed.

Member Function Documentation

◆ constructor()

TypingInkSignImageGenerator::constructor (   content = '')
inline
Parameters
contentstring - content

◆ generateImage()

TypingInkSignImageGenerator::generateImage (   width = 114,
  height = 57 
)
inline

Generate typing ink signature image and transfromed into data url.

Parameters
widthnumber Define image width
heightnumber Define image height
Returns
string - base64 data url of the image.

◆ getFontFamily()

TypingInkSignImageGenerator::getFontFamily ( )
inline

Returns current font name.

Returns
string - the fon name.

◆ getFontSize()

TypingInkSignImageGenerator::getFontSize ( )
inline

Returns current font size.

Returns
number - font size in pixel unit.

◆ importFontFamily()

TypingInkSignImageGenerator::importFontFamily (   fontFamily,
  uri 
)
inline

Import thirdparty font from specific url globally via -face rule in css.

Parameters
fontFamilyString - The name of the font.
uriString - specify the font file URL where should be download from.

◆ setContent()

TypingInkSignImageGenerator::setContent (   content)
inline

Update the text content, it takes effect while calling the generateImage method next time.

Parameters
content{String} content

◆ setFontFamily()

TypingInkSignImageGenerator::setFontFamily (   fontFamily)
inline

Update the font name, it takes effect while calling the generateImage method next time.

Parameters
fontFamilystring - the font name

◆ setFontSize()

TypingInkSignImageGenerator::setFontSize (   fontSize)
inline

Update the font size, it takes effect while calling the generateImage method next time.

Parameters
fontSizenumber - font size in pixel unit

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