SignDoc SDK (Java)
5.0.0
|
Parameters for a watermark. More...
Public Member Functions | |
SignDocWatermark () throws SignDocException | |
Constructor. More... | |
synchronized SignDocWatermark | clone () throws SignDocException |
Clone this object. More... | |
synchronized void | clear () throws SignDocException |
Reset all parameters to their default values. More... | |
synchronized void | setText (String aText) throws SignDocException |
Set the text to be used for the watermark. More... | |
synchronized void | setFontName (String aFontName) throws SignDocException |
Set the name of the font. More... | |
synchronized void | setFontSize (double aFontSize) throws SignDocException |
Set the font size. More... | |
synchronized void | setTextColor (SignDocColor aTextColor) throws SignDocException |
Set the text color. More... | |
synchronized void | setJustification (int aJustification) throws SignDocException |
Set the justification for multi-line text. More... | |
synchronized void | setRotation (double aRotation) throws SignDocException |
Set the rotation. More... | |
synchronized void | setOpacity (double aOpacity) throws SignDocException |
Set the opacity. More... | |
synchronized void | setScale (double aScale) throws SignDocException |
Disable scaling or set scaling relative to page. More... | |
synchronized void | setLocation (int aLocation) throws SignDocException |
Set whether the watermark will appear behind the page or on top of the page. More... | |
synchronized void | setHorizontalPosition (int aAlignment, double aDistance) throws SignDocException |
Set the horizontal position of the watermark. More... | |
synchronized void | setVerticalPosition (int aAlignment, double aDistance) throws SignDocException |
Set the vertical position of the watermark. More... | |
synchronized void | setFirstPage (int aPage) throws SignDocException |
Set the first page number. More... | |
synchronized void | setLastPage (int aPage) throws SignDocException |
Set the last page number. More... | |
synchronized void | setPageIncrement (int aIncr) throws SignDocException |
Set the page number increment. More... | |
synchronized void | setFlags (int aFlags) throws SignDocException |
Set flags. More... | |
synchronized void | close () |
Destroy the underlying native object (for java.lang.AutoCloseable). More... | |
Static Public Attributes | |
static final int | j_left = 0 |
Justification: left. More... | |
static final int | j_center = 1 |
Justification: center. More... | |
static final int | j_right = 2 |
Justification: right. More... | |
static final int | l_overlay = 0 |
Location of watermark: Watermark appears on top of page. More... | |
static final int | l_underlay = 1 |
Location of watermark: Watermark appears behind page. More... | |
static final int | ha_left = 0 |
Horizontal alignment: Align left. More... | |
static final int | ha_center = 1 |
Horizontal alignment: Center. More... | |
static final int | ha_right = 2 |
Horizontal alignment: Align right. More... | |
static final int | va_top = 0 |
Vertical alignment: Align top. More... | |
static final int | va_center = 1 |
Vertical alignment: Center. More... | |
static final int | va_bottom = 2 |
Vertical alignment: Align bottom. More... | |
static final int | f_ltr = 0x1000 |
Flag for setFlags(): Paragraph direction: LTR. More... | |
static final int | f_rtl = 0x2000 |
Flag for setFlags(): Paragraph direction: RTL. More... | |
static final int | f_default_ltr = 0x4000 |
Flag for setFlags(): Choose direction automatically, default to LTR. More... | |
static final int | f_default_rtl = 0x8000 |
Flag for setFlags(): Choose direction automatically, default to RTL. More... | |
Protected Member Functions | |
void | finalize () throws Throwable |
Finalize this object. More... | |
Parameters for a watermark.
SignDocWatermark | ( | ) | throws SignDocException |
Constructor.
synchronized void clear | ( | ) | throws SignDocException |
Reset all parameters to their default values.
synchronized SignDocWatermark clone | ( | ) | throws SignDocException |
Clone this object.
synchronized void close | ( | ) |
Destroy the underlying native object (for java.lang.AutoCloseable).
After calling this method, all methods but close() will throw SignDocUnexpectedErrorException.
|
protected |
Finalize this object.
Do not call this method unless you know what you are doing.
synchronized void setFirstPage | ( | int | aPage | ) | throws SignDocException |
Set the first page number.
The default value is 1.
[in] | aPage | The 1-based page number of the first page. |
synchronized void setFlags | ( | int | aFlags | ) | throws SignDocException |
Set flags.
Initially, no flag is set.
[in] | aFlags | See f_ltr, f_rtl, f_default_ltr, and f_default_rtl. |
synchronized void setFontName | ( | String | aFontName | ) | throws SignDocException |
Set the name of the font.
The font name can be the name of a standard font, the name of an already embedded font, or the name of a font defined by a font configuration file.
The default value is "Helvetica".
[in] | aFontName | The new font name. |
synchronized void setFontSize | ( | double | aFontSize | ) | throws SignDocException |
Set the font size.
The default value is 24.
[in] | aFontSize | The font size (in user space units). |
synchronized void setHorizontalPosition | ( | int | aAlignment, |
double | aDistance | ||
) | throws SignDocException |
Set the horizontal position of the watermark.
The default values are ha_center and 0.
The distance is measured from the left edge of the page to the left edge of the watermark (ha_left), from the center of the page to the center of the watermark (ha_center), or from the right edge of the page to the right edge of the watermark (ha_right).
For ha_left and ha_center, positive values push the watermark to the right, for ha_right, positive values push the watermark to the left.
[in] | aAlignment | Measure distance from here: ha_left, ha_center, or ha_right. |
[in] | aDistance | The distance in user space units. |
synchronized void setJustification | ( | int | aJustification | ) | throws SignDocException |
synchronized void setLastPage | ( | int | aPage | ) | throws SignDocException |
Set the last page number.
The default value is 0.
[in] | aPage | The 1-based page number of the last page or 0 for the last page of the document. |
synchronized void setLocation | ( | int | aLocation | ) | throws SignDocException |
Set whether the watermark will appear behind the page or on top of the page.
The default value is l_overlay.
[in] | aLocation | l_overlay or l_underlay. |
synchronized void setOpacity | ( | double | aOpacity | ) | throws SignDocException |
Set the opacity.
The default value is 1.0. Documents conforming to PDF/A-1 must use an opacity of 1.0.
[in] | aOpacity | The opacity, 0.0 (transparent) through 1.0 (opaque). |
synchronized void setPageIncrement | ( | int | aIncr | ) | throws SignDocException |
Set the page number increment.
The default value is 1 (add watermark to all pages between the first page and the last page)
[in] | aIncr | Add this number to the page number when iterating over pages adding watermarks. Must be positive. |
synchronized void setRotation | ( | double | aRotation | ) | throws SignDocException |
Set the rotation.
The default value is 0.
[in] | aRotation | The rotation in degrees (-180 through 180), 0 is horizontal (left to right), 45 is bottom left to upper right. |
synchronized void setScale | ( | double | aScale | ) | throws SignDocException |
Disable scaling or set scaling relative to page.
The default value is 0.5.
[in] | aScale | 0 to disable scaling (use the font size set by setFontSize()) or 0.01 through 64.0 to scale relative to the page size. |
synchronized void setText | ( | String | aText | ) | throws SignDocException |
Set the text to be used for the watermark.
The default value is empty.
The text can contain multiple lines, the newline character is used to separate lines. If there are multiple lines, their relative position is specified by setJustification().
Complex scripts are supported, see Complex Scripts. By default, this function uses paragraph direction LTR. Use setFlags() if you need to set a different paragraph direction.
[in] | aText | The text. Complex scripts are supported, see Complex Scripts. |
synchronized void setTextColor | ( | SignDocColor | aTextColor | ) | throws SignDocException |
Set the text color.
The default value is black (gray).
[in] | aTextColor | The text color. |
synchronized void setVerticalPosition | ( | int | aAlignment, |
double | aDistance | ||
) | throws SignDocException |
Set the vertical position of the watermark.
The default values are va_center and 0.
The distance is measured from the top edge of the page to the top edge of the watermark (va_top), from the center of the page to the center of the watermark (va_center), or from the bottom edge of the page to the bottom edge of the watermark (va_bottom).
For va_bottom and va_center, positive values push the watermark up, for va_top, positive values push the watermark down.
[in] | aAlignment | Measure distance from here: va_top, va_center, or va_bottom. |
[in] | aDistance | The distance in user space units. |
|
static |
Flag for setFlags(): Choose direction automatically, default to LTR.
The base direction of each paragraph (BiDi paragraph level) will depend on the first strong directional character in the paragraph.
The paragraph level will be 0 (LTR) for paragraphs having no strong directional character.
If none of f_ltr, f_rtl, f_default_ltr, and f_default_rtl is set, f_ltr will be used.
At most one of f_ltr, f_rtl, f_default_ltr, and f_default_rtl can be set.
|
static |
Flag for setFlags(): Choose direction automatically, default to RTL.
The base direction of each paragraph (BiDi paragraph level) will depend on the first strong directional character in the paragraph.
The paragraph level will be 1 (RTL) for paragraphs having no strong directional character.
If none of f_ltr, f_rtl, f_default_ltr, and f_default_rtl is set, f_ltr will be used.
At most one of f_ltr, f_rtl, f_default_ltr, and f_default_rtl can be set.
|
static |
Flag for setFlags(): Paragraph direction: LTR.
If none of f_ltr, f_rtl, f_default_ltr, and f_default_rtl is set, f_ltr will be used.
At most one of f_ltr, f_rtl, f_default_ltr, and f_default_rtl can be set.
|
static |
Flag for setFlags(): Paragraph direction: RTL.
If none of f_ltr, f_rtl, f_default_ltr, and f_default_rtl is set, f_ltr will be used.
At most one of f_ltr, f_rtl, f_default_ltr, and f_default_rtl can be set.
|
static |
Horizontal alignment: Center.
|
static |
Horizontal alignment: Align left.
|
static |
Horizontal alignment: Align right.
|
static |
Justification: center.
|
static |
Justification: left.
|
static |
Justification: right.
|
static |
Location of watermark: Watermark appears on top of page.
|
static |
Location of watermark: Watermark appears behind page.
|
static |
Vertical alignment: Align bottom.
|
static |
Vertical alignment: Center.
|
static |
Vertical alignment: Align top.