Foxit PDF SDK

Public Types | Public Member Functions | Properties | List of all members
foxit.pdf.WatermarkTextProperties Class Reference

Inherits SystemIDisposable.

## Public Types
enum | FontStyle { FontStyle.e_FontStyleNormal = 0, FontStyle.e_FontStyleUnderline = 1 }
| Enumeration for watermark font style. More...

## Public Member Functions
| WatermarkTextProperties (Font font, float font_size, int color, WatermarkTextProperties.FontStyle style, float line_space, Alignment alignment)
| Constructor, with parameters. More...
| WatermarkTextProperties ()
| Constructor.
| WatermarkTextProperties (WatermarkTextProperties properties)
| Constructor, with another watermark text properties object. More...
void | Set (Font font, float font_size, int color, WatermarkTextProperties.FontStyle style, float line_space, Alignment alignment)
| Set value. More...

## Properties
Alignment | alignment`[get, set]`
| Text horizontal alignment. The default value is foxit.common.Alignment.e_AlignmentLeft . More...
int | color`[get, set]`
| Text color. Format: 0xRRGGBB. The default value is 0x000000.
Font? | font`[get, set]`
| A font object used for the text.
float | font_size`[get, set]`
| Font size in points. The default value is 24.0.
WatermarkTextProperties.FontStyle | font_style`[get, set]`
| Font style.The default value is foxit.pdf.WatermarkTextProperties.FontStyle.e_FontStyleNormal . More...
float | line_space`[get, set]`
| Space between vertical center of lines, in line heights. The default value is 1.0. More...

## Detailed Description

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

## Member Enumeration Documentation

## ◆ FontStyle

enum foxit.pdf.WatermarkTextProperties.FontStyle
| strong

Enumeration for watermark font style.

Values of this enumeration should be used alone.

Enumerator
e_FontStyleNormal | Watermark font style: normal.
e_FontStyleUnderline | Watermark font style: with underline.

## Constructor & Destructor Documentation

## ◆ WatermarkTextProperties() [1/2]

foxit.pdf.WatermarkTextProperties.WatermarkTextProperties | ( | Font | font,
|  | float | font_size,
|  | int | color,
|  | WatermarkTextProperties.FontStyle | style,
|  | float | line_space,
|  | Alignment | alignment
| ) |  |
| inline

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: foxit.pdf.WatermarkTextProperties.FontStyle.e_FontStyleNormal foxit.pdf.WatermarkTextProperties.FontStyle.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: foxit.common.Alignment.e_AlignmentLeft foxit.common.Alignment.e_AlignmentCenter foxit.common.Alignment.e_AlignmentRight

## ◆ WatermarkTextProperties() [2/2]

foxit.pdf.WatermarkTextProperties.WatermarkTextProperties | ( | WatermarkTextProperties | properties | ) |
| inline

Constructor, with another watermark text properties object.

Parameters

  [in] | properties | Another watermark text properties object.

## Member Function Documentation

## ◆ Set()

void foxit.pdf.WatermarkTextProperties.Set | ( | Font | font,
|  | float | font_size,
|  | int | color,
|  | WatermarkTextProperties.FontStyle | style,
|  | float | line_space,
|  | Alignment | alignment
| ) |  |
| inline

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: foxit.pdf.WatermarkTextProperties.FontStyle.e_FontStyleNormal foxit.pdf.WatermarkTextProperties.FontStyle.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: foxit.common.Alignment.e_AlignmentLeft foxit.common.Alignment.e_AlignmentCenter foxit.common.Alignment.e_AlignmentRight

Returns
  None.

## Property Documentation

## ◆ alignment

Alignment foxit.pdf.WatermarkTextProperties.alignment
| get set

Text horizontal alignment. The default value is foxit.common.Alignment.e_AlignmentLeft .

It should be one of the following macro definitions:

- foxit.common.Alignment.e_AlignmentLeft

- foxit.common.Alignment.e_AlignmentCenter

- foxit.common.Alignment.e_AlignmentRight

## ◆ font_style

WatermarkTextProperties.FontStyle foxit.pdf.WatermarkTextProperties.font_style
| get set

Font style.The default value is foxit.pdf.WatermarkTextProperties.FontStyle.e_FontStyleNormal .

It should be one of the following values:

- foxit.pdf.WatermarkTextProperties.FontStyle.e_FontStyleNormal

- foxit.pdf.WatermarkTextProperties.FontStyle.e_FontStyleUnderline

## ◆ line_space

float foxit.pdf.WatermarkTextProperties.line_space
| get set

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.