SignDoc SDK (.NET without exceptions)  5.0.0
SignDocWatermark Class Reference

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...
 

Detailed Description

Parameters for a watermark.

See also
SignDocDocument.addWatermark()

Constructor & Destructor Documentation

Constructor.

Copy constructor.

Parameters
[in]aSourceThe object to be copied.
Returns
The new object.

Destructor.

Finalizer.

Member Function Documentation

void clear ( )

Reset all parameters to their default values.

void setFirstPage ( int  aPage)

Set the first page number.

The default value is 1.

Parameters
[in]aPageThe 1-based page number of the first page.
See also
setLastPage(), setPageIncrement()
void setFlags ( WatermarkFlags  aFlags)

Set flags.

Initially, no flag is set.

Parameters
[in]aFlagsSee enum WatermarkFlags.
See also
setText()
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".

Parameters
[in]aFontNameThe new font name.
See also
setFontSize(), setTextColor(), SignDocDocumentLoader.loadFontConfigBlob(), SignDocDocumentLoader.loadFontConfigEnvironment(), SignDocDocumentLoader.loadFontConfigFile(), SignDocDocumentLoader.loadFontConfigStream()
void setFontSize ( double  aFontSize)

Set the font size.

The default value is 24.

Parameters
[in]aFontSizeThe font size (in user space units).
See also
setFontName(), setScale()
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.

Parameters
[in]aAlignmentMeasure distance from here.
[in]aDistanceThe distance in user space units.
See also
setScale(), setVerticalPosition()
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.

Parameters
[in]aJustificationThe justification.
See also
setText()
void setLastPage ( int  aPage)

Set the last page number.

The default value is 0.

Parameters
[in]aPageThe 1-based page number of the last page or 0 for the last page of the document.
See also
setFirstPage(), setPageIncrement()
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.

Parameters
[in]aLocationWatermarkLocation.Overlay or WatermarkLocation.Underlay.
See also
setOpacity()
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.

Parameters
[in]aOpacityThe opacity, 0.0 (transparent) through 1.0 (opaque).
See also
setLocation()
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)

Parameters
[in]aIncrAdd this number to the page number when iterating over pages adding watermarks. Must be positive.
See also
setFirstPage(), setLastPage()
void setRotation ( double  aRotation)

Set the rotation.

The default value is 0.

Parameters
[in]aRotationThe 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.

Parameters
[in]aScale0 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.

Parameters
[in]aTextThe text. Complex scripts are supported, see Complex Scripts.
See also
setFlags(), setFontName(), setFontSize(), setJustification(), setTextColor()
void setTextColor ( SignDocColor  aTextColor)

Set the text color.

The default value is black (gray scale).

Parameters
[in]aTextColorThe 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.

Parameters
[in]aAlignmentMeasure distance from here.
[in]aDistanceThe distance in user space units.
See also
setHorizontalPosition(), setScale()

The documentation for this class was generated from the following file: