SignDoc SDK (C++)
5.0.0
|
Parameters for a watermark. More...
#include <SignDocSDK-cpp.h>
Public Types | |
enum | Justification { j_left, j_center, j_right } |
Justification of multi-line text. More... | |
enum | Location { l_overlay, l_underlay } |
Location of watermark. More... | |
enum | HAlignment { ha_left, ha_center, ha_right } |
Horizontal alignment. More... | |
enum | VAlignment { va_top, va_center, va_bottom } |
Vertical alignment. More... | |
enum | Flags { f_ltr = 0x1000, f_rtl = 0x2000, f_default_ltr = 0x4000, f_default_rtl = 0x8000 } |
Flags for setFlags(). More... | |
Public Member Functions | |
SignDocWatermark () | |
Constructor. More... | |
SignDocWatermark (const SignDocWatermark &aSource) | |
Copy constructor. More... | |
~SignDocWatermark () | |
Destructor. More... | |
SignDocWatermark & | operator= (const SignDocWatermark &aSource) |
Assignment operator. More... | |
void | swap (SignDocWatermark &aOther) |
Efficiently swap this object with another one. More... | |
void | clear () |
Reset all parameters to their default values. More... | |
void | setText (Encoding aEncoding, const std::string &aText) |
Set the text to be used for the watermark. More... | |
void | setFontName (Encoding aEncoding, const std::string &aFontName) |
Set the name of the font. More... | |
void | setFontSize (double aFontSize) |
Set the font size. More... | |
void | setTextColor (const SignDocColor &aTextColor) |
Set the text color. More... | |
void | setJustification (Justification 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 (Location aLocation) |
Set whether the watermark will appear behind the page or on top of the page. More... | |
void | setHorizontalPosition (HAlignment aAlignment, double aDistance) |
Set the horizontal position of the watermark. More... | |
void | setVerticalPosition (VAlignment 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 (int aFlags) |
Set flags. More... | |
SignDocWatermark (SIGNDOC_Watermark *aP) | |
Internal function. More... | |
SIGNDOC_Watermark * | getImpl () |
Internal function. More... | |
const SIGNDOC_Watermark * | getImpl () const |
Internal function. More... | |
void | setImpl (SIGNDOC_Watermark *aP) |
Internal function. More... | |
Parameters for a watermark.
enum Flags |
Flags for setFlags().
Enumerator | |
---|---|
f_ltr |
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. |
f_rtl |
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. |
f_default_ltr |
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. |
f_default_rtl |
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. |
enum HAlignment |
enum Justification |
enum Location |
enum VAlignment |
|
inline |
Constructor.
All parameters are set to their default values.
|
inline |
Copy constructor.
[in] | aSource | The object to be copied. |
|
inline |
Destructor.
|
inline |
Internal function.
|
inline |
Reset all parameters to their default values.
|
inline |
Internal function.
|
inline |
Internal function.
|
inline |
Assignment operator.
[in] | aSource | The source object. |
|
inline |
Set the first page number.
The default value is 1.
[in] | aPage | The 1-based page number of the first page. |
|
inline |
|
inline |
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] | aEncoding | The encoding of aFontName. |
[in] | aFontName | The new font name. |
|
inline |
Set the font size.
The default value is 24.
[in] | aFontSize | The font size (in user space units). |
|
inline |
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. |
[in] | aDistance | The distance in user space units. |
|
inline |
Internal function.
|
inline |
|
inline |
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. |
|
inline |
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. |
|
inline |
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). |
|
inline |
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. |
|
inline |
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. |
|
inline |
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. |
|
inline |
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] | aEncoding | The encoding of aText. |
[in] | aText | The text. Complex scripts are supported, see Complex Scripts. |
|
inline |
Set the text color.
The default value is black (gray scale).
[in] | aTextColor | The text color. |
|
inline |
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. |
[in] | aDistance | The distance in user space units. |
|
inline |
Efficiently swap this object with another one.
[in] | aOther | The other object. |