![]() |
SignDoc SDK (C)
5.0.0
|
Attributes of a text field, list box field or combo box field used for the construction of the appearance (PDF documents only). More...
#include <SignDocSDK-c.h>
Attributes of a text field, list box field or combo box field used for the construction of the appearance (PDF documents only).
This class represents a PDF default appearance string.
Modifying an object of this type does not modify the underlying field or document. Use SIGNDOC_Document_setTextFieldAttributes() or SIGNDOC_Field_setTextFieldAttributes() to update the text attributes of a field or of the document.
void SIGNDOC_TextFieldAttributes_assign | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_TextFieldAttributes * | aObj, | ||
const struct SIGNDOC_TextFieldAttributes * | aSource | ||
) |
SIGNDOC_TextFieldAttributes assignment operator.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_TextFieldAttributes object. |
[in] | aSource | The source object. |
void SIGNDOC_TextFieldAttributes_clear | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_TextFieldAttributes * | aObj | ||
) |
Unset all attributes.
SIGNDOC_TextFieldAttributes_isSet() will return SIGNDOC_FALSE.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_TextFieldAttributes object. |
struct SIGNDOC_TextFieldAttributes * SIGNDOC_TextFieldAttributes_clone | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_TextFieldAttributes * | aSource | ||
) |
Clone a SIGNDOC_TextFieldAttributes 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_TextFieldAttributes_delete | ( | struct SIGNDOC_TextFieldAttributes * | aObj | ) |
SIGNDOC_TextFieldAttributes destructor.
[in] | aObj | A pointer to the SIGNDOC_TextFieldAttributes object. |
char * SIGNDOC_TextFieldAttributes_getFontName | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_TextFieldAttributes * | aObj, | ||
int | aEncoding | ||
) |
Get the name of the font.
This function returns an empty string if SIGNDOC_TextFieldAttributes_isSet() would return SIGNDOC_FALSE.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_TextFieldAttributes object. |
[in] | aEncoding | The encoding to be used for the return value (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
char * SIGNDOC_TextFieldAttributes_getFontResourceName | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_TextFieldAttributes * | aObj, | ||
int | aEncoding | ||
) |
Get the resource name of the font.
This function returns an empty string if SIGNDOC_TextFieldAttributes_isSet() would return SIGNDOC_FALSE.
Note that setting the resource name is not possible.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_TextFieldAttributes object. |
[in] | aEncoding | The encoding to be used for the return value (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
double SIGNDOC_TextFieldAttributes_getFontSize | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_TextFieldAttributes * | aObj | ||
) |
Get the font size.
This function returns 0 if SIGNDOC_TextFieldAttributes_isSet() would return SIGNDOC_FALSE.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_TextFieldAttributes object. |
char * SIGNDOC_TextFieldAttributes_getRest | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_TextFieldAttributes * | aObj, | ||
int | aEncoding | ||
) |
Get unparsed parts of default appearance string.
If this function returns a non-empty string, there are unsupported operators in the default appearance string.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_TextFieldAttributes object. |
[in] | aEncoding | The encoding to be used for the return value (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
struct SIGNDOC_Color * SIGNDOC_TextFieldAttributes_getTextColor | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_TextFieldAttributes * | aObj | ||
) |
Get the text color.
This function returns NULL if SIGNDOC_TextFieldAttributes_isSet() would return SIGNDOC_FALSE.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_TextFieldAttributes object. |
SIGNDOC_Boolean SIGNDOC_TextFieldAttributes_isSet | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_TextFieldAttributes * | aObj | ||
) |
Check if text field attributes are set or not.
If this function returns SIGNDOC_FALSE for a SIGNDOC_TextFieldAttributes object retrieved from a text field, the document's default text field attributes will be used (if present).
This function returns SIGNDOC_FALSE for all SIGNDOC_TextFieldAttributes objects retrieved from TIFF documents (but you can set the attributes anyway, making SIGNDOC_TextFieldAttributes_isSet() return SIGNDOC_TRUE).
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_TextFieldAttributes object. |
SIGNDOC_Boolean SIGNDOC_TextFieldAttributes_isValid | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_TextFieldAttributes * | aObj | ||
) |
Check if the text field attributes are valid.
This function does not check if the font name refers to a valid font. This function does not check the string set by SIGNDOC_TextFieldAttributes_setRest().
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_TextFieldAttributes object. |
struct SIGNDOC_TextFieldAttributes * SIGNDOC_TextFieldAttributes_new | ( | struct SIGNDOC_Exception ** | aEx | ) |
SIGNDOC_TextFieldAttributes constructor.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
void SIGNDOC_TextFieldAttributes_setFontName | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_TextFieldAttributes * | 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.
SIGNDOC_Document_addSignature() ignores the font name set by this function if string parameter "FontName" of struct SIGNDOC_SignatureParameters is set to a non-empty value or if the "SignatureTemplate" element of the XML document given to blob parameter "Template" has a non-empty "font-name" attribute.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_TextFieldAttributes 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_TextFieldAttributes_setFontSize | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_TextFieldAttributes * | aObj, | ||
double | aFontSize | ||
) |
Set the font size.
SIGNDOC_Document_addSignature() ignores the font size set by this function and uses length parameter "FontSize" of struct SIGNDOC_SignatureParameters instead.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_TextFieldAttributes object. |
[in] | aFontSize | The font size (in user space units). If the font size is 0, the default font size (which depends on the field size) will be used. |
void SIGNDOC_TextFieldAttributes_setRest | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_TextFieldAttributes * | aObj, | ||
int | aEncoding, | ||
const char * | aInput | ||
) |
Set unparsed parts of default appearance string.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_TextFieldAttributes object. |
[in] | aEncoding | The encoding of aInput (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aInput | The new string of unparsed operators. If this string is non-empty and does not start with a space character, a space character will be prepended automatically. |
void SIGNDOC_TextFieldAttributes_setTextColor | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_TextFieldAttributes * | aObj, | ||
const struct SIGNDOC_Color * | aTextColor | ||
) |
Set the text color.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_TextFieldAttributes object. |
[in] | aTextColor | The text color. |