Foxit PDF SDK
fsdk.WatermarkSettings Class Reference

Public Member Functions

def GetFlags ()
 Get watermark flags. More...
 
def GetIs_offset_centered ()
 Get if true, position is invaild, and offset is the centered of the watermark. More...
 
def GetOffset_x ()
 Get horizontal offset, in points. More...
 
def GetOffset_y ()
 Get vertical offset, in points. More...
 
def GetOpacity ()
 Get opacity in percents. More...
 
def GetPosition ()
 Get watermark position. More...
 
def GetRelative_scale_to_page ()
 Get relative scale to target page. More...
 
def GetRotation ()
 Get rotation angle in degrees. More...
 
def GetScale_x ()
 Get horizontal scale coefficient. More...
 
def GetScale_y ()
 Get vertical scale coefficient. More...
 
def Set (position, offset_x, offset_y, flags, scale_x, scale_y, rotation, opacity, is_offset_centered, relative_scale_to_page)
 Set value.
More...
 
def SetFlags (value)
 Set watermark flags. More...
 
def SetIs_offset_centered (value)
 Set if true, position is invaild, and offset is the centered of the watermark. More...
 
def SetOffset_x (value)
 Set horizontal offset, in points. More...
 
def SetOffset_y (value)
 Set vertical offset, in points. More...
 
def SetOpacity (value)
 Set opacity in percents. More...
 
def SetPosition (value)
 Set watermark position. More...
 
def SetRelative_scale_to_page (value)
 Set relative scale to target page. More...
 
def SetRotation (value)
 Set rotation angle in degrees. More...
 
def SetScale_x (value)
 Set horizontal scale coefficient. More...
 
def SetScale_y (value)
 Set vertical scale coefficient. More...
 

Detailed Description

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

Member Function Documentation

◆ GetFlags()

fsdk.WatermarkSettings.GetFlags ( )

Get watermark flags.

Please refer to values starting from fsdk.WatermarkSettingsE_FlagASPageContents and this can be one or a combination of these values.

Returns
Watermark flags.

◆ GetIs_offset_centered()

fsdk.WatermarkSettings.GetIs_offset_centered ( )

Get if true, position is invaild, and offset is the centered of the watermark.

Returns
If true, position is invaild, and offset is the centered of the watermark. If false, offset is relative to the position.

◆ GetOffset_x()

fsdk.WatermarkSettings.GetOffset_x ( )

Get horizontal offset, in points.

Returns
Horizontal offset, in points.

◆ GetOffset_y()

fsdk.WatermarkSettings.GetOffset_y ( )

Get vertical offset, in points.

Returns
Vertical offset, in points.

◆ GetOpacity()

fsdk.WatermarkSettings.GetOpacity ( )

Get opacity in percents.

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

◆ GetPosition()

fsdk.WatermarkSettings.GetPosition ( )

Get watermark position.

Please refer to values starting from fsdk.E_PosTopLeft and this should be one of these values.

Returns
Watermark position.

◆ GetRelative_scale_to_page()

fsdk.WatermarkSettings.GetRelative_scale_to_page ( )

Get relative scale to target page.

Returns
Relative scale to target page. Valid range: from 0 to 1 (exclusive of 0). If the value is 0 or greater than 1, this feature is disabled and scale_x/scale_y will be used instead. Default value: 0 (disabled).

◆ GetRotation()

fsdk.WatermarkSettings.GetRotation ( )

Get rotation angle in degrees.

Returns
Rotation angle in degrees.

◆ GetScale_x()

fsdk.WatermarkSettings.GetScale_x ( )

Get horizontal scale coefficient.

Returns
Horizontal scale coefficient. It should be greater than 0.001f.

◆ GetScale_y()

fsdk.WatermarkSettings.GetScale_y ( )

Get vertical scale coefficient.

Returns
Vertical scale coefficient. It should be greater than 0.001f.

◆ Set()

def fsdk.WatermarkSettings.Set (   position,
  offset_x,
  offset_y,
  flags,
  scale_x,
  scale_y,
  rotation,
  opacity,
  is_offset_centered,
  relative_scale_to_page 
)

Set value.

Parameters
[in]positionWatermark position. Please refer to values starting from fsdk.E_PosTopLeft and this should be one of these values.
[in]offset_xHorizontal offset, in points.
[in]offset_yVertical offset, in points.
[in]flagsWatermark flags. Please refer to values starting from fsdk.WatermarkSettingsE_FlagASPageContents and this can be one or a combination of these values.
[in]scale_xHorizontal scale coefficient. It should be greater than 0.001f.
[in]scale_yVertical scale coefficient. It should be greater than 0.001f.
[in]rotationRotation angle in degrees.
[in]opacityOpacity in percents. Valid range: from 0 to 100. 0 for fully transparent and 100 for fully opaque.
[in]is_offset_centeredA boolean value which indicates whether offset is based on the watermark center. true means that the offset is based on the watermark center and the position will be ignored. false means not.
[in]relative_scale_to_pageRelative scale to target page. Valid range: from 0 to 1 (exclusive of 0). If the value is 0 or greater than 1, this feature is disabled and scale_x/scale_y will be used instead.
Returns
None.

◆ SetFlags()

fsdk.WatermarkSettings.SetFlags (   value)

Set watermark flags.

Please refer to values starting from fsdk.WatermarkSettingsE_FlagASPageContents and this can be one or a combination of these values.

Parameters
[in]valueWatermark flags.
Returns
None.

◆ SetIs_offset_centered()

fsdk.WatermarkSettings.SetIs_offset_centered (   value)

Set if true, position is invaild, and offset is the centered of the watermark.

Parameters
[in]valueIf true, position is invaild, and offset is the centered of the watermark. If false, offset is relative to the position.
Returns
None.

◆ SetOffset_x()

fsdk.WatermarkSettings.SetOffset_x (   value)

Set horizontal offset, in points.

Parameters
[in]valueHorizontal offset, in points.
Returns
None.

◆ SetOffset_y()

fsdk.WatermarkSettings.SetOffset_y (   value)

Set vertical offset, in points.

Parameters
[in]valueVertical offset, in points.
Returns
None.

◆ SetOpacity()

fsdk.WatermarkSettings.SetOpacity (   value)

Set opacity in percents.

Parameters
[in]valueOpacity in percents. Valid range: from 0 to 100. 0 for fully transparent and 100 for fully opaque.
Returns
None.

◆ SetPosition()

fsdk.WatermarkSettings.SetPosition (   value)

Set watermark position.

Please refer to values starting from fsdk.E_PosTopLeft and this should be one of these values.

Parameters
[in]valueWatermark position.
Returns
None.

◆ SetRelative_scale_to_page()

fsdk.WatermarkSettings.SetRelative_scale_to_page (   value)

Set relative scale to target page.

Parameters
[in]valueRelative scale to target page. Valid range: from 0 to 1 (exclusive of 0). If the value is 0 or greater than 1, this feature is disabled and scale_x/scale_y will be used instead. Default value: 0 (disabled).
Returns
None.

◆ SetRotation()

fsdk.WatermarkSettings.SetRotation (   value)

Set rotation angle in degrees.

Parameters
[in]valueRotation angle in degrees.
Returns
None.

◆ SetScale_x()

fsdk.WatermarkSettings.SetScale_x (   value)

Set horizontal scale coefficient.

Parameters
[in]valueHorizontal scale coefficient. It should be greater than 0.001f.
Returns
None.

◆ SetScale_y()

fsdk.WatermarkSettings.SetScale_y (   value)

Set vertical scale coefficient.

Parameters
[in]valueVertical scale coefficient. It should be greater than 0.001f.
Returns
None.