Foxit PDF SDK

Public Member Functions | Static Public Attributes | List of all members
com.foxit.sdk.pdf.TiledWatermarkSettings Class Reference

## Public Member Functions
| TiledWatermarkSettings ()
| Constructor and set the default value. More...
| TiledWatermarkSettings (float row_space, float col_space, float rotation, int opacity, int scale, int flags)
| Constructor, with parameters. More...
| TiledWatermarkSettings (TiledWatermarkSettings settings)
| Constructor, with another tiled watermark settings object. More...
synchronized void | delete ()
| Clean up related C++ resources immediately. More...
float | getCol_space ()
| Get the column spacing for multiple lines of tiled watermark. More...
int | getFlags ()
| Get watermark flags. More...
int | getOpacity ()
| Get opacity in percents. More...
float | getRotation ()
| Get rotation angle in degrees. More...
float | getRow_space ()
| Get the row spacing for multiple lines of tiled watermark. More...
int | getScale ()
| Get the image or page scale in percents. More...
void | set (float row_space, float col_space, float rotation, int opacity, int scale, int flags)
| Set value. More...
void | setCol_space (float value)
| Set the column spacing for multiple lines of tiled watermark. More...
void | setFlags (int value)
| Set watermark flags. More...
void | setOpacity (int value)
| Set opacity in percents. More...
void | setRotation (float value)
| Set rotation angle in degrees. More...
void | setRow_space (float value)
| Set the row spacing for multiple lines of tiled watermark. More...
void | setScale (int value)
| Set the image or page scale in percents. More...

## Static Public Attributes
static final int | e_FlagAsAnnot = 0x0001
| If set, the watermark will be an annotation when inserted to a PDF page, and the watermark will be show above other content.
static final int | e_FlagAsPageContents = 0x0000
| If set, the watermark will be a part of page content when inserted to a PDF page.
static final int | e_FlagInvisible = 0x0008
| If set, do not display a watermark.
static final int | e_FlagNoPrint = 0x0004
| If set, do not print a watermark.
static final int | e_FlagOnTop = 0x0002
| If set, show watermark above other page content.

## Detailed Description

This class represents the watermark settings used to construct a tiled watermark from any supported resource.

## Constructor & Destructor Documentation

## ◆ TiledWatermarkSettings() [1/3]

com.foxit.sdk.pdf.TiledWatermarkSettings.TiledWatermarkSettings | ( | float | row_space,
|  | float | col_space,
|  | float | rotation,
|  | int | opacity,
|  | int | scale,
|  | int | flags
| ) |  |

Constructor, with parameters.

The parameter scale doesn't support text tiled watermark, and will have no effect after setting.

Parameters

  [in] | row_space | The row spacing for multiple lines of tiled watermark. Its unit is inch and it can't be a negative number.
  [in] | col_space | The column spacing for multiple lines of tiled watermark. Its unit is inch and it can't be a negative number.
  [in] | rotation | Rotation angle in degrees.
  [in] | opacity | Opacity in percents. Valid range: from 0 to 100. 0 for fully transparent and 100 for fully opaque.
  [in] | scale | The image or page scale in percents. Valid range: from 0 to 100. 0 means not displayed, 100 means the image or page is displayed at its original scale size.
  [in] | flags | Watermark flags. Please refer to values starting from com.foxit.sdk.pdf.TiledWatermarkSettings.e_FlagAsPageContents and this can be one or a combination of these values. Default value: com.foxit.sdk.pdf.TiledWatermarkSettings.e_FlagAsPageContents .

## ◆ TiledWatermarkSettings() [2/3]

com.foxit.sdk.pdf.TiledWatermarkSettings.TiledWatermarkSettings | ( |  | ) |

Constructor and set the default value.

By default, the watermark is not rotated and opacity is completely opaque, the row spacing and column spacing defaults to 2.0 inches. If it's an image or page watermark, display the original scale size.

## ◆ TiledWatermarkSettings() [3/3]

com.foxit.sdk.pdf.TiledWatermarkSettings.TiledWatermarkSettings | ( | TiledWatermarkSettings | settings | ) |

Constructor, with another tiled watermark settings object.

Parameters

  [in] | settings | Another tiled watermark settings object.

## Member Function Documentation

## ◆ delete()

synchronized void com.foxit.sdk.pdf.TiledWatermarkSettings.delete | ( |  | ) |

Clean up related C++ resources immediately.

Returns
  None.

Note
  Once this function is called, current object cannot be used anymore.

## ◆ getCol_space()

com.foxit.sdk.pdf.TiledWatermarkSettings.getCol_space | ( |  | ) |

Get the column spacing for multiple lines of tiled watermark.

Returns
  The column spacing for multiple lines of tiled watermark. Its unit is inch and it can't be a negative number.

## ◆ getFlags()

com.foxit.sdk.pdf.TiledWatermarkSettings.getFlags | ( |  | ) |

Get watermark flags.

Please refer to values starting from com.foxit.sdk.pdf.TiledWatermarkSettings.e_FlagAsPageContents and this can be one or a combination of these values.
Default value: com.foxit.sdk.pdf.TiledWatermarkSettings.e_FlagAsPageContents .

Returns
  Watermark flags.

## ◆ getOpacity()

com.foxit.sdk.pdf.TiledWatermarkSettings.getOpacity | ( |  | ) |

Get opacity in percents.

Returns
  Opacity in percents. Valid range: from 0 to 100. 0 for fully transparent and 100 for fully opaque.

## ◆ getRotation()

com.foxit.sdk.pdf.TiledWatermarkSettings.getRotation | ( |  | ) |

Get rotation angle in degrees.

Returns
  Rotation angle in degrees.

## ◆ getRow_space()

com.foxit.sdk.pdf.TiledWatermarkSettings.getRow_space | ( |  | ) |

Get the row spacing for multiple lines of tiled watermark.

Returns
  The row spacing for multiple lines of tiled watermark. Its unit is inch and it can't be a negative number.

## ◆ getScale()

com.foxit.sdk.pdf.TiledWatermarkSettings.getScale | ( |  | ) |

Get the image or page scale in percents.

Returns
  The image or page scale in percents. Valid range: from 1 to 100. 100 means the image or page is displayed at its original size. The default value is

## ◆ set()

void com.foxit.sdk.pdf.TiledWatermarkSettings.set | ( | float | row_space,
|  | float | col_space,
|  | float | rotation,
|  | int | opacity,
|  | int | scale,
|  | int | flags
| ) |  |

Set value.

The parameter scale doesn't support text tiled watermark, and will have no effect after setting.

Parameters

  [in] | row_space | The row spacing for multiple lines of tiled watermark. Its unit is inch and it can't be a negative number.
  [in] | col_space | The column spacing for multiple lines of tiled watermark. Its unit is inch and it can't be a negative number.
  [in] | rotation | Rotation angle in degrees.
  [in] | opacity | Opacity in percents. Valid range: from 0 to 100. 0 for fully transparent and 100 for fully opaque.
  [in] | scale | The image or page scale in percents. Valid range: from 0 to 100. 0 means not displayed, 100 means the image or page is displayed at its original scale size.
  [in] | flags | Watermark flags. Please refer to values starting from com.foxit.sdk.pdf.TiledWatermarkSettings.e_FlagAsPageContents and this can be one or a combination of these values. Default value: com.foxit.sdk.pdf.TiledWatermarkSettings.e_FlagAsPageContents .

Returns
  None.

## ◆ setCol_space()

com.foxit.sdk.pdf.TiledWatermarkSettings.setCol_space | ( | float | value | ) |

Set the column spacing for multiple lines of tiled watermark.

Parameters

  [in] | value | The column spacing for multiple lines of tiled watermark. Its unit is inch and it can't be a negative number.

Returns
  None.

## ◆ setFlags()

com.foxit.sdk.pdf.TiledWatermarkSettings.setFlags | ( | int | value | ) |

Set watermark flags.

Please refer to values starting from com.foxit.sdk.pdf.TiledWatermarkSettings.e_FlagAsPageContents and this can be one or a combination of these values.
Default value: com.foxit.sdk.pdf.TiledWatermarkSettings.e_FlagAsPageContents .

Parameters

  [in] | value | Watermark flags.

Returns
  None.

## ◆ setOpacity()

com.foxit.sdk.pdf.TiledWatermarkSettings.setOpacity | ( | int | value | ) |

Set opacity in percents.

Parameters

  [in] | value | Opacity in percents. Valid range: from 0 to 100. 0 for fully transparent and 100 for fully opaque.

Returns
  None.

## ◆ setRotation()

com.foxit.sdk.pdf.TiledWatermarkSettings.setRotation | ( | float | value | ) |

Set rotation angle in degrees.

Parameters

  [in] | value | Rotation angle in degrees.

Returns
  None.

## ◆ setRow_space()

com.foxit.sdk.pdf.TiledWatermarkSettings.setRow_space | ( | float | value | ) |

Set the row spacing for multiple lines of tiled watermark.

Parameters

  [in] | value | The row spacing for multiple lines of tiled watermark. Its unit is inch and it can't be a negative number.

Returns
  None.

## ◆ setScale()

com.foxit.sdk.pdf.TiledWatermarkSettings.setScale | ( | int | value | ) |

Set the image or page scale in percents.

Parameters

  [in] | value | The image or page scale in percents. Valid range: from 1 to 100. 100 means the image or page is displayed at its original size. The default value is

Returns
  None.