Foxit PDF SDK

Public Member Functions | Public Attributes | Static Public Attributes | List of all members
FSDK.WatermarkTextProperties Class Reference

## Public Member Functions
| constructor ()
| Constructor.
| constructor (font, font_size, color, style, line_space, alignment)
| Constructor, with parameters. More...
| Set (font, font_size, color, style, line_space, alignment)
| Set value. More...

## Public Attributes
| alignment
| Text horizontal alignment. The default value is FSDK.e_AlignmentLeft. More...
| color
| Text color. Format: 0xRRGGBB. The default value is 0x000000.
| font
| A font object used for the text.
| font_size
| Font size in points. The default value is 24.0.
| font_style
| Font style.The default value is FSDK.WatermarkTextProperties.e_FontStyleNormal. More...
| line_space
| Space between vertical center of lines, in line heights. The default value is 1.0. More...

## Static Public Attributes
static | e_FontStyleNormal
| Enumeration for watermark font style. More...
static | e_FontStyleUnderline
| Watermark font style: with underline.

## Detailed Description

This class represents the watermark text settings used to construct a watermark object from text.

## Member Function Documentation

## ◆ constructor()

FSDK.WatermarkTextProperties.constructor | ( | font | ,
|  | font_size | ,
|  | color | ,
|  | style | ,
|  | line_space | ,
|  | alignment |
| ) |  |

Constructor, with parameters.

The parameters line_space and alignment don't support tiled watermark, and will have no effect after setting.

Parameters

  [in] | font | A valid font object used for the text.
  [in] | font_size | Font size in points.
  [in] | color | Text color. Format: 0xRRGGBB.
  [in] | style | Font style. It should be one of the following values: FSDK.WatermarkTextProperties.e_FontStyleNormal FSDK.WatermarkTextProperties.e_FontStyleUnderline
  [in] | line_space | Space between vertical center of lines, in line heights. This value specifies the multiple of line heights for the space between vertical center of lines. Valid range: from 0 to 10 (not including 0 but including 10). If this value is above 10, 10 will be used as default for the text watermark.
  [in] | alignment | Text horizontal alignment. It should be one of the following values: FSDK.e_AlignmentLeft FSDK.e_AlignmentCenter FSDK.e_AlignmentRight

## ◆ Set()

FSDK.WatermarkTextProperties.Set | ( | font | ,
|  | font_size | ,
|  | color | ,
|  | style | ,
|  | line_space | ,
|  | alignment |
| ) |  |

Set value.

The parameters line_space and alignment don't support tiled watermark, and will have no effect after setting.

Parameters

  [in] | font | A valid font object used for the text.
  [in] | font_size | Font size in points.
  [in] | color | Text color. Format: 0xRRGGBB.
  [in] | style | Font style. It should be one of the following values: FSDK.WatermarkTextProperties.e_FontStyleNormal FSDK.WatermarkTextProperties.e_FontStyleUnderline
  [in] | line_space | Space between vertical center of lines, in line heights. This value specifies the multiple of line heights for the space between vertical center of lines. Valid range: from 0 to 10 (not including 0 but including 10). If this value is above 10, 10 will be used as default for the text watermark.
  [in] | alignment | Text horizontal alignment. It should be one of the following values: FSDK.e_AlignmentLeft FSDK.e_AlignmentCenter FSDK.e_AlignmentRight

Returns
  None.

## Member Data Documentation

## ◆ alignment

FSDK.WatermarkTextProperties.alignment

Text horizontal alignment. The default value is FSDK.e_AlignmentLeft.

It should be one of the following macro definitions:

- FSDK.e_AlignmentLeft
- FSDK.e_AlignmentCenter
- FSDK.e_AlignmentRight

## ◆ e_FontStyleNormal

FSDK.WatermarkTextProperties.e_FontStyleNormal
| static

Enumeration for watermark font style.

Values of this enumeration should be used alone.

Watermark font style: normal.

## ◆ font_style

FSDK.WatermarkTextProperties.font_style

Font style.The default value is FSDK.WatermarkTextProperties.e_FontStyleNormal.

It should be one of the following values:

- FSDK.WatermarkTextProperties.e_FontStyleNormal
- FSDK.WatermarkTextProperties.e_FontStyleUnderline

## ◆ line_space

FSDK.WatermarkTextProperties.line_space

Space between vertical center of lines, in line heights. The default value is 1.0.

This value is used to specify the multiple of line heights for the space between vertical center of lines. Valid range: from 0 to 10 (not including 0 but including 10). If this value is above 10, 10 will be used as default for the text watermark.