SignDoc SDK (.NET with exceptions)
5.0.0
|
Parameters for a watermark. More...
Public Member Functions | |
SignDocWatermark () | |
Constructor. More... | |
SignDocWatermark (SignDocWatermark aSource) | |
Copy constructor. More... | |
~SignDocWatermark () | |
Destructor. More... | |
!SignDocWatermark () | |
Finalizer. More... | |
void | clear () |
Reset all parameters to their default values. More... | |
void | setText (string aText) |
Set the text to be used for the watermark. More... | |
void | setFontName (string aFontName) |
Set the name of the font. More... | |
void | setFontSize (double aFontSize) |
Set the font size. More... | |
void | setTextColor (SignDocColor aTextColor) |
Set the text color. More... | |
void | setJustification (WatermarkJustification aJustification) |
Set the justification for multi-line text. More... | |
void | setRotation (double aRotation) |
Set the rotation. More... | |
void | setOpacity (double aOpacity) |
Set the opacity. More... | |
void | setScale (double aScale) |
Disable scaling or set scaling relative to page. More... | |
void | setLocation (WatermarkLocation aLocation) |
Set whether the watermark will appear behind the page or on top of the page. More... | |
void | setHorizontalPosition (WatermarkHAlignment aAlignment, double aDistance) |
Set the horizontal position of the watermark. More... | |
void | setVerticalPosition (WatermarkVAlignment aAlignment, double aDistance) |
Set the vertical position of the watermark. More... | |
void | setFirstPage (int aPage) |
Set the first page number. More... | |
void | setLastPage (int aPage) |
Set the last page number. More... | |
void | setPageIncrement (int aIncr) |
Set the page number increment. More... | |
void | setFlags (WatermarkFlags aFlags) |
Set flags. More... | |
Parameters for a watermark.
SignDocWatermark | ( | ) |
Constructor.
SignDocWatermark | ( | SignDocWatermark | aSource | ) |
Copy constructor.
[in] | aSource | The object to be copied. |
~SignDocWatermark | ( | ) |
Destructor.
!SignDocWatermark | ( | ) |
Finalizer.
void clear | ( | ) |
Reset all parameters to their default values.
void setFirstPage | ( | int | aPage | ) |
Set the first page number.
The default value is 1.
[in] | aPage | The 1-based page number of the first page. |
void setFlags | ( | WatermarkFlags | aFlags | ) |
Set flags.
Initially, no flag is set.
[in] | aFlags | See enum WatermarkFlags. |
void setFontName | ( | string | aFontName | ) |
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. |
void setFontSize | ( | double | aFontSize | ) |
Set the font size.
The default value is 24.
[in] | aFontSize | The font size (in user space units). |
void setHorizontalPosition | ( | WatermarkHAlignment | aAlignment, |
double | aDistance | ||
) |
Set the horizontal position of the watermark.
The default values are WatermarkHAlignment.Center and 0.
The distance is measured from the left edge of the page to the left edge of the watermark (WatermarkHAlignment.Left), from the center of the page to the center of the watermark (WatermarkHAlignment.Center), or from the right edge of the page to the right edge of the watermark (WatermarkHAlignment.Right).
For WatermarkHAlignment.Left and WatermarkHAlignment.Center, positive values push the watermark to the right, for WatermarkHAlignment.Right, positive values push the watermark to the left.
[in] | aAlignment | Measure distance from here. |
[in] | aDistance | The distance in user space units. |
void setJustification | ( | WatermarkJustification | aJustification | ) |
Set the justification for multi-line text.
The default value is WatermarkJustification.Left.
If the text (see setText()) contains only one line (ie, no newline characters), this parameter will be ignored.
[in] | aJustification | The justification. |
void setLastPage | ( | int | aPage | ) |
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. |
void setLocation | ( | WatermarkLocation | aLocation | ) |
Set whether the watermark will appear behind the page or on top of the page.
The default value is WatermarkLocation.Overlay.
[in] | aLocation | WatermarkLocation.Overlay or WatermarkLocation.Underlay. |
void setOpacity | ( | double | aOpacity | ) |
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). |
void setPageIncrement | ( | int | aIncr | ) |
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. |
void setRotation | ( | double | aRotation | ) |
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. |
void setScale | ( | double | aScale | ) |
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. |
void setText | ( | string | aText | ) |
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. |
void setTextColor | ( | SignDocColor | aTextColor | ) |
Set the text color.
The default value is black (gray scale).
[in] | aTextColor | The text color. |
void setVerticalPosition | ( | WatermarkVAlignment | aAlignment, |
double | aDistance | ||
) |
Set the vertical position of the watermark.
The default values are WatermarkHAlignment.Center and 0.
The distance is measured from the top edge of the page to the top edge of the watermark (WatermarkVAlignment.Top), from the center of the page to the center of the watermark (WatermarkHAlignment.Center), or from the bottom edge of the page to the bottom edge of the watermark (WatermarkVAlignment.Bottom).
For WatermarkVAlignment.Bottom and WatermarkHAlignment.Center, positive values push the watermark up, for WatermarkVAlignment.Top, positive values push the watermark down.
[in] | aAlignment | Measure distance from here. |
[in] | aDistance | The distance in user space units. |