|
Foxit PDF SDK
|
Public Member Functions | |
| WatermarkSettings () | |
| Constructor. | |
| WatermarkSettings (int position, float offset_x, float offset_y, int flags, float scale_x, float scale_y, float rotation, int opacity, boolean is_offset_centered, float relative_scale_to_page) | |
| Constructor, with parameters. More... | |
| WatermarkSettings (WatermarkSettings settings) | |
| Constructor, with another watermark settings object. More... | |
| synchronized void | delete () |
| Clean up related C++ resources immediately. More... | |
| int | getFlags () |
| Get watermark flags. More... | |
| boolean | getIs_offset_centered () |
| Get if true, position is invaild, and offset is the centered of the watermark. More... | |
| float | getOffset_x () |
| Get horizontal offset, in points. More... | |
| float | getOffset_y () |
| Get vertical offset, in points. More... | |
| int | getOpacity () |
| Get opacity in percents. More... | |
| int | getPosition () |
| Get watermark position. More... | |
| float | getRelative_scale_to_page () |
| Get relative scale to target page. More... | |
| float | getRotation () |
| Get rotation angle in degrees. More... | |
| float | getScale_x () |
| Get horizontal scale coefficient. More... | |
| float | getScale_y () |
| Get vertical scale coefficient. More... | |
| void | set (int position, float offset_x, float offset_y, int flags, float scale_x, float scale_y, float rotation, int opacity, boolean is_offset_centered, float relative_scale_to_page) |
| Set value. More... | |
| void | setFlags (int value) |
| Set watermark flags. More... | |
| void | setIs_offset_centered (boolean value) |
| Set if true, position is invaild, and offset is the centered of the watermark. More... | |
| void | setOffset_x (float value) |
| Set horizontal offset, in points. More... | |
| void | setOffset_y (float value) |
| Set vertical offset, in points. More... | |
| void | setOpacity (int value) |
| Set opacity in percents. More... | |
| void | setPosition (int value) |
| Set watermark position. More... | |
| void | setRelative_scale_to_page (float value) |
| Set relative scale to target page. More... | |
| void | setRotation (float value) |
| Set rotation angle in degrees. More... | |
| void | setScale_x (float value) |
| Set horizontal scale coefficient. More... | |
| void | setScale_y (float value) |
| Set vertical scale coefficient. More... | |
Static Public Attributes | |
| static final int | e_FlagASAnnot = 0x0001 |
| If set, the watermark will be an annotation when inserted to a PDF page. | |
| 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. | |
| static final int | e_FlagShareImageStream = 0x0010 |
| If set, watermarks will share one image stream if these watermarks use the same image or bitmap. | |
| static final int | e_FlagSharePageStream = 0x0040 |
| If set, watermarks will share one form xobject if these watermarks use the same page object. | |
| static final int | e_FlagShareTextStream = 0x0020 |
| If set, watermarks will share one form xobject if these watermarks use the same text and text's related properties. | |
This class represents the watermark settings used to construct a watermark object from any supported resource.
此类表示和OFD水印相关的位置属性。
| com.foxit.sdk.pdf.WatermarkSettings.WatermarkSettings | ( | int | position, |
| float | offset_x, | ||
| float | offset_y, | ||
| int | flags, | ||
| float | scale_x, | ||
| float | scale_y, | ||
| float | rotation, | ||
| int | opacity, | ||
| boolean | is_offset_centered, | ||
| float | relative_scale_to_page | ||
| ) |
Constructor, with parameters.
| [in] | position | Watermark position. Please refer to values starting from com.foxit.sdk.common.Constants.e_PosTopLeft and this should be one of these values. |
| [in] | offset_x | Horizontal offset, in points. |
| [in] | offset_y | Vertical offset, in points. |
| [in] | flags | Watermark flags. Please refer to values starting from com.foxit.sdk.pdf.WatermarkSettings.e_FlagASPageContents and this can be one or a combination of these values. |
| [in] | scale_x | Horizontal scale coefficient. It should be greater than 0.001f. |
| [in] | scale_y | Vertical scale coefficient. It should be greater than 0.001f. |
| [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] | is_offset_centered | A 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_page | 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. |
| com.foxit.sdk.pdf.WatermarkSettings.WatermarkSettings | ( | WatermarkSettings | settings | ) |
Constructor, with another watermark settings object.
构造函数,通过另一个水印位置属性对象。
| [in] | settings | Another watermark settings object. |
| [in] | settings | 另一个水印位置属性对象。 |
| synchronized void com.foxit.sdk.pdf.WatermarkSettings.delete | ( | ) |
Clean up related C++ resources immediately.
| com.foxit.sdk.pdf.WatermarkSettings.getFlags | ( | ) |
Get watermark flags.
Please refer to values starting from com.foxit.sdk.pdf.WatermarkSettings.e_FlagASPageContents and this can be one or a combination of these values.
| com.foxit.sdk.pdf.WatermarkSettings.getIs_offset_centered | ( | ) |
Get if true, position is invaild, and offset is the centered of the watermark.
| com.foxit.sdk.pdf.WatermarkSettings.getOffset_x | ( | ) |
Get horizontal offset, in points.
| com.foxit.sdk.pdf.WatermarkSettings.getOffset_y | ( | ) |
Get vertical offset, in points.
| com.foxit.sdk.pdf.WatermarkSettings.getOpacity | ( | ) |
Get opacity in percents.
| com.foxit.sdk.pdf.WatermarkSettings.getPosition | ( | ) |
Get watermark position.
Please refer to values starting from com.foxit.sdk.common.Constants.e_PosTopLeft and this should be one of these values.
| com.foxit.sdk.pdf.WatermarkSettings.getRelative_scale_to_page | ( | ) |
Get relative scale to target page.
| com.foxit.sdk.pdf.WatermarkSettings.getRotation | ( | ) |
Get rotation angle in degrees.
| com.foxit.sdk.pdf.WatermarkSettings.getScale_x | ( | ) |
Get horizontal scale coefficient.
| com.foxit.sdk.pdf.WatermarkSettings.getScale_y | ( | ) |
Get vertical scale coefficient.
| void com.foxit.sdk.pdf.WatermarkSettings.set | ( | int | position, |
| float | offset_x, | ||
| float | offset_y, | ||
| int | flags, | ||
| float | scale_x, | ||
| float | scale_y, | ||
| float | rotation, | ||
| int | opacity, | ||
| boolean | is_offset_centered, | ||
| float | relative_scale_to_page | ||
| ) |
Set value.
| [in] | position | Watermark position. Please refer to values starting from com.foxit.sdk.common.Constants.e_PosTopLeft and this should be one of these values. |
| [in] | offset_x | Horizontal offset, in points. |
| [in] | offset_y | Vertical offset, in points. |
| [in] | flags | Watermark flags. Please refer to values starting from com.foxit.sdk.pdf.WatermarkSettings.e_FlagASPageContents and this can be one or a combination of these values. |
| [in] | scale_x | Horizontal scale coefficient. It should be greater than 0.001f. |
| [in] | scale_y | Vertical scale coefficient. It should be greater than 0.001f. |
| [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] | is_offset_centered | A 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_page | 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. |
| com.foxit.sdk.pdf.WatermarkSettings.setFlags | ( | int | value | ) |
Set watermark flags.
Please refer to values starting from com.foxit.sdk.pdf.WatermarkSettings.e_FlagASPageContents and this can be one or a combination of these values.
| [in] | value | Watermark flags. |
| com.foxit.sdk.pdf.WatermarkSettings.setIs_offset_centered | ( | boolean | value | ) |
Set if true, position is invaild, and offset is the centered of the watermark.
| [in] | value | If true, position is invaild, and offset is the centered of the watermark. If false, offset is relative to the position. |
| com.foxit.sdk.pdf.WatermarkSettings.setOffset_x | ( | float | value | ) |
Set horizontal offset, in points.
| [in] | value | Horizontal offset, in points. |
| com.foxit.sdk.pdf.WatermarkSettings.setOffset_y | ( | float | value | ) |
Set vertical offset, in points.
| [in] | value | Vertical offset, in points. |
| com.foxit.sdk.pdf.WatermarkSettings.setOpacity | ( | int | value | ) |
Set opacity in percents.
| [in] | value | Opacity in percents. Valid range: from 0 to 100. 0 for fully transparent and 100 for fully opaque. |
| com.foxit.sdk.pdf.WatermarkSettings.setPosition | ( | int | value | ) |
Set watermark position.
Please refer to values starting from com.foxit.sdk.common.Constants.e_PosTopLeft and this should be one of these values.
| [in] | value | Watermark position. |
| com.foxit.sdk.pdf.WatermarkSettings.setRelative_scale_to_page | ( | float | value | ) |
Set relative scale to target page.
| [in] | value | 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). |
| com.foxit.sdk.pdf.WatermarkSettings.setRotation | ( | float | value | ) |
Set rotation angle in degrees.
| [in] | value | Rotation angle in degrees. |
| com.foxit.sdk.pdf.WatermarkSettings.setScale_x | ( | float | value | ) |
Set horizontal scale coefficient.
| [in] | value | Horizontal scale coefficient. It should be greater than 0.001f. |
| com.foxit.sdk.pdf.WatermarkSettings.setScale_y | ( | float | value | ) |
Set vertical scale coefficient.
| [in] | value | Vertical scale coefficient. It should be greater than 0.001f. |