SignDoc SDK (C)  5.0.0
SIGNDOC_Watermark Class Reference

Parameters for a watermark. More...

#include <SignDocSDK-c.h>

Public Member Functions

struct SIGNDOC_WatermarkSIGNDOC_Watermark_new (struct SIGNDOC_Exception **aEx)
 SIGNDOC_Watermark constructor. More...
 
struct SIGNDOC_WatermarkSIGNDOC_Watermark_clone (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Watermark *aSource)
 clone a SIGNDOC_Watermark object. More...
 
void SIGNDOC_Watermark_delete (struct SIGNDOC_Watermark *aObj)
 SIGNDOC_Watermark destructor. More...
 
void SIGNDOC_Watermark_assign (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj, const struct SIGNDOC_Watermark *aSource)
 SIGNDOC_Watermark assignment operator. More...
 
void SIGNDOC_Watermark_clear (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj)
 Reset all parameters to their default values. More...
 
void SIGNDOC_Watermark_setText (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj, int aEncoding, const char *aText)
 Set the text to be used for the watermark. More...
 
void SIGNDOC_Watermark_setFontName (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj, int aEncoding, const char *aFontName)
 Set the name of the font. More...
 
void SIGNDOC_Watermark_setFontSize (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj, double aFontSize)
 Set the font size. More...
 
void SIGNDOC_Watermark_setTextColor (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj, const struct SIGNDOC_Color *aTextColor)
 Set the text color. More...
 
void SIGNDOC_Watermark_setJustification (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj, int aJustification)
 Set the justification for multi-line text. More...
 
void SIGNDOC_Watermark_setRotation (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj, double aRotation)
 Set the rotation. More...
 
void SIGNDOC_Watermark_setOpacity (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj, double aOpacity)
 Set the opacity. More...
 
void SIGNDOC_Watermark_setScale (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj, double aScale)
 Disable scaling or set scaling relative to page. More...
 
void SIGNDOC_Watermark_setLocation (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj, int aLocation)
 Set whether the watermark will appear behind the page or on top of the page. More...
 
void SIGNDOC_Watermark_setHorizontalPosition (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj, int aAlignment, double aDistance)
 Set the horizontal position of the watermark. More...
 
void SIGNDOC_Watermark_setVerticalPosition (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj, int aAlignment, double aDistance)
 Set the vertical position of the watermark. More...
 
void SIGNDOC_Watermark_setFirstPage (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj, int aPage)
 Set the first page number. More...
 
void SIGNDOC_Watermark_setLastPage (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj, int aPage)
 Set the last page number. More...
 
void SIGNDOC_Watermark_setPageIncrement (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj, int aIncr)
 Set the page number increment. More...
 
void SIGNDOC_Watermark_setFlags (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Watermark *aObj, int aFlags)
 Set flags. More...
 

Detailed Description

Parameters for a watermark.

See also
SIGNDOC_Document_addWatermark()

Member Function Documentation

void SIGNDOC_Watermark_assign ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj,
const struct SIGNDOC_Watermark aSource 
)

SIGNDOC_Watermark assignment operator.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
[in]aSourceThe source object.
void SIGNDOC_Watermark_clear ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj 
)

Reset all parameters to their default values.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
struct SIGNDOC_Watermark * SIGNDOC_Watermark_clone ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Watermark aSource 
)

clone a SIGNDOC_Watermark object.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aSourceThe object to be copied.
void SIGNDOC_Watermark_delete ( struct SIGNDOC_Watermark aObj)

SIGNDOC_Watermark destructor.

Parameters
[in]aObjA pointer to the SIGNDOC_Watermark object.
struct SIGNDOC_Watermark * SIGNDOC_Watermark_new ( struct SIGNDOC_Exception **  aEx)

SIGNDOC_Watermark constructor.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
void SIGNDOC_Watermark_setFirstPage ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj,
int  aPage 
)

Set the first page number.

The default value is 1.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
[in]aPageThe 1-based page number of the first page.
See also
SIGNDOC_Watermark_setLastPage(), SIGNDOC_Watermark_setPageIncrement()
void SIGNDOC_Watermark_setFlags ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj,
int  aFlags 
)

Set flags.

Initially, no flag is set.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
[in]aFlagsSee SIGNDOC_WATERMARK_FLAGS_LTR, SIGNDOC_WATERMARK_FLAGS_RTL, SIGNDOC_WATERMARK_FLAGS_DEFAULT_LTR, and SIGNDOC_WATERMARK_FLAGS_DEFAULT_RTL.
See also
SIGNDOC_Watermark_setText()
void SIGNDOC_Watermark_setFontName ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj,
int  aEncoding,
const char *  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
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
[in]aEncodingThe encoding of aFontName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aFontNameThe new font name.
See also
SIGNDOC_Watermark_setFontSize(), SIGNDOC_Watermark_setTextColor(), SIGNDOC_DocumentLoader_loadFontConfigBlob(), SIGNDOC_DocumentLoader_loadFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadFontConfigFile(), SIGNDOC_DocumentLoader_loadFontConfigStream()
void SIGNDOC_Watermark_setFontSize ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj,
double  aFontSize 
)

Set the font size.

The default value is 24.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
[in]aFontSizeThe font size (in user space units).
See also
SIGNDOC_Watermark_setFontName(), SIGNDOC_Watermark_setScale()
void SIGNDOC_Watermark_setHorizontalPosition ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj,
int  aAlignment,
double  aDistance 
)

Set the horizontal position of the watermark.

The default values are SIGNDOC_WATERMARK_HALIGNMENT_CENTER and 0.

The distance is measured from the left edge of the page to the left edge of the watermark (SIGNDOC_WATERMARK_HALIGNMENT_LEFT), from the center of the page to the center of the watermark (SIGNDOC_WATERMARK_HALIGNMENT_CENTER), or from the right edge of the page to the right edge of the watermark SIGNDOC_WATERMARK_HALIGNMENT_RIGHT).

For SIGNDOC_WATERMARK_HALIGNMENT_LEFT and SIGNDOC_WATERMARK_HALIGNMENT_CENTER, positive values push the watermark to the right, for SIGNDOC_WATERMARK_HALIGNMENT_RIGHT, positive values push the watermark to the left.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
[in]aAlignmentMeasure distance from here: SIGNDOC_WATERMARK_HALIGNMENT_LEFT, SIGNDOC_WATERMARK_HALIGNMENT_CENTER, or SIGNDOC_WATERMARK_HALIGNMENT_RIGHT.
[in]aDistanceThe distance in user space units.
See also
SIGNDOC_Watermark_setScale(), SIGNDOC_Watermark_setVerticalPosition()
void SIGNDOC_Watermark_setJustification ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj,
int  aJustification 
)

Set the justification for multi-line text.

The default value is SIGNDOC_WATERMARK_JUSTIFICATION_LEFT.

If the text (see SIGNDOC_Watermark_setText()) contains only one line (ie, no newline characters), this parameter will be ignored.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
[in]aJustificationThe justification: SIGNDOC_WATERMARK_JUSTIFICATION_LEFT, SIGNDOC_WATERMARK_JUSTIFICATION_CENTER, SIGNDOC_WATERMARK_JUSTIFICATION_RIGHT.
See also
SIGNDOC_Watermark_setText()
void SIGNDOC_Watermark_setLastPage ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj,
int  aPage 
)

Set the last page number.

The default value is 0.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
[in]aPageThe 1-based page number of the last page or 0 for the last page of the document.
See also
SIGNDOC_Watermark_setFirstPage(), SIGNDOC_Watermark_setPageIncrement()
void SIGNDOC_Watermark_setLocation ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj,
int  aLocation 
)

Set whether the watermark will appear behind the page or on top of the page.

The default value is SIGNDOC_WATERMARK_LOCATION_OVERLAY.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
[in]aLocationWhere to put the overlay: SIGNDOC_WATERMARK_LOCATION_OVERLAY or SIGNDOC_WATERMARK_LOCATION_UNDERLAY.
See also
SIGNDOC_Watermark_setOpacity()
void SIGNDOC_Watermark_setOpacity ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj,
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
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
[in]aOpacityThe opacity, 0.0 (transparent) through 1.0 (opaque).
See also
SIGNDOC_Watermark_setLocation()
void SIGNDOC_Watermark_setPageIncrement ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj,
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
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
[in]aIncrAdd this number to the page number when iterating over pages adding watermarks. Must be positive.
See also
SIGNDOC_Watermark_setFirstPage(), SIGNDOC_Watermark_setLastPage()
void SIGNDOC_Watermark_setRotation ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj,
double  aRotation 
)

Set the rotation.

The default value is 0.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
[in]aRotationThe rotation in degrees (-180 through 180), 0 is horizontal (left to right), 45 is bottom left to upper right.
void SIGNDOC_Watermark_setScale ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj,
double  aScale 
)

Disable scaling or set scaling relative to page.

The default value is 0.5.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
[in]aScale0 to disable scaling (use the font size set by SIGNDOC_Watermark_setFontSize()) or 0.01 through 64.0 to scale relative to the page size.
void SIGNDOC_Watermark_setText ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj,
int  aEncoding,
const char *  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 SIGNDOC_Watermark_setJustification().

Complex scripts are supported, see Complex Scripts. By default, this function uses paragraph direction LTR. Use SIGNDOC_Watermark_setFlags() if you need to set a different paragraph direction.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
[in]aEncodingThe encoding of aText (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aTextThe text. Complex scripts are supported, see Complex Scripts.
See also
SIGNDOC_Watermark_setFlags(), SIGNDOC_Watermark_setFontName(), SIGNDOC_Watermark_setFontSize(), SIGNDOC_Watermark_setJustification(), SIGNDOC_Watermark_setTextColor()
void SIGNDOC_Watermark_setTextColor ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj,
const struct SIGNDOC_Color aTextColor 
)

Set the text color.

The default value is black (gray scale).

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
[in]aTextColorThe text color. The value will be copied.
void SIGNDOC_Watermark_setVerticalPosition ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Watermark aObj,
int  aAlignment,
double  aDistance 
)

Set the vertical position of the watermark.

The default values are SIGNDOC_WATERMARK_VALIGNMENT_CENTER and 0.

The distance is measured from the top edge of the page to the top edge of the watermark (SIGNDOC_WATERMARK_VALIGNMENT_TOP), from the center of the page to the center of the watermark (SIGNDOC_WATERMARK_VALIGNMENT_CENTER), or from the bottom edge of the page to the bottom edge of the watermark (SIGNDOC_WATERMARK_VALIGNMENT_BOTTOM).

For SIGNDOC_WATERMARK_VALIGNMENT_BOTTOM and SIGNDOC_WATERMARK_VALIGNMENT_CENTER, positive values push the watermark up, for SIGNDOC_WATERMARK_VALIGNMENT_TOP, positive values push the watermark down.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Watermark object.
[in]aAlignmentMeasure distance from here: SIGNDOC_WATERMARK_VALIGNMENT_TOP, SIGNDOC_WATERMARK_VALIGNMENT_CENTER, or SIGNDOC_WATERMARK_VALIGNMENT_BOTTOM.
[in]aDistanceThe distance in user space units.
See also
SIGNDOC_Watermark_setHorizontalPosition(), SIGNDOC_Watermark_setScale()

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