SignDoc SDK (C)
5.0.0
|
Parameters for a watermark. More...
#include <SignDocSDK-c.h>
Public Member Functions | |
struct SIGNDOC_Watermark * | SIGNDOC_Watermark_new (struct SIGNDOC_Exception **aEx) |
SIGNDOC_Watermark constructor. More... | |
struct SIGNDOC_Watermark * | SIGNDOC_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... | |
Parameters for a watermark.
void SIGNDOC_Watermark_assign | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_Watermark * | aObj, | ||
const struct SIGNDOC_Watermark * | aSource | ||
) |
SIGNDOC_Watermark assignment operator.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
[in] | aSource | The source object. |
void SIGNDOC_Watermark_clear | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_Watermark * | aObj | ||
) |
Reset all parameters to their default values.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A 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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aSource | The object to be copied. |
void SIGNDOC_Watermark_delete | ( | struct SIGNDOC_Watermark * | aObj | ) |
SIGNDOC_Watermark destructor.
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
struct SIGNDOC_Watermark * SIGNDOC_Watermark_new | ( | struct SIGNDOC_Exception ** | aEx | ) |
SIGNDOC_Watermark constructor.
[out] | aEx | Any 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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
[in] | aPage | The 1-based page number of the first page. |
void SIGNDOC_Watermark_setFlags | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_Watermark * | aObj, | ||
int | aFlags | ||
) |
Set flags.
Initially, no flag is set.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
[in] | aFlags | See SIGNDOC_WATERMARK_FLAGS_LTR, SIGNDOC_WATERMARK_FLAGS_RTL, SIGNDOC_WATERMARK_FLAGS_DEFAULT_LTR, and SIGNDOC_WATERMARK_FLAGS_DEFAULT_RTL. |
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".
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
[in] | aEncoding | The encoding of aFontName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aFontName | The new font name. |
void SIGNDOC_Watermark_setFontSize | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_Watermark * | aObj, | ||
double | aFontSize | ||
) |
Set the font size.
The default value is 24.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
[in] | aFontSize | The font size (in user space units). |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
[in] | aAlignment | Measure distance from here: SIGNDOC_WATERMARK_HALIGNMENT_LEFT, SIGNDOC_WATERMARK_HALIGNMENT_CENTER, or SIGNDOC_WATERMARK_HALIGNMENT_RIGHT. |
[in] | aDistance | The distance in user space units. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
[in] | aJustification | The justification: SIGNDOC_WATERMARK_JUSTIFICATION_LEFT, SIGNDOC_WATERMARK_JUSTIFICATION_CENTER, SIGNDOC_WATERMARK_JUSTIFICATION_RIGHT. |
void SIGNDOC_Watermark_setLastPage | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_Watermark * | aObj, | ||
int | aPage | ||
) |
Set the last page number.
The default value is 0.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
[in] | aPage | The 1-based page number of the last page or 0 for the last page of the document. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
[in] | aLocation | Where to put the overlay: SIGNDOC_WATERMARK_LOCATION_OVERLAY or SIGNDOC_WATERMARK_LOCATION_UNDERLAY. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
[in] | aOpacity | The opacity, 0.0 (transparent) through 1.0 (opaque). |
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)
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
[in] | aIncr | Add this number to the page number when iterating over pages adding watermarks. Must be positive. |
void SIGNDOC_Watermark_setRotation | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_Watermark * | aObj, | ||
double | aRotation | ||
) |
Set the rotation.
The default value is 0.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
[in] | aRotation | The 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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
[in] | aScale | 0 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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
[in] | aEncoding | The encoding of aText (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aText | The text. Complex scripts are supported, see Complex Scripts. |
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).
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
[in] | aTextColor | The 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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Watermark object. |
[in] | aAlignment | Measure distance from here: SIGNDOC_WATERMARK_VALIGNMENT_TOP, SIGNDOC_WATERMARK_VALIGNMENT_CENTER, or SIGNDOC_WATERMARK_VALIGNMENT_BOTTOM. |
[in] | aDistance | The distance in user space units. |