| FoxitPDFSDKforWeb v11.0.5 Archives Foxit PDF SDK for Web

Public Member Functions | List of all members
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

  content | string - content

## ◆ generateImage()

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

Generate typing ink signature image and transfromed into data url.

Parameters

  width | number Define image width
  height | number 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

  fontFamily | String - The name of the font.
  uri | String - 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

  fontFamily | string - the font name

## ◆ setFontSize()

TypingInkSignImageGenerator::setFontSize | ( |  | fontSize | ) |
| inline

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

Parameters

  fontSize | number - font size in pixel unit

@2025 Foxit Software Incorporated. All rights reserved.