SignDoc SDK (.NET without exceptions)
5.0.0
|
An annotation. More...
Public Member Functions | |
~SignDocAnnotation () | |
Destructor. More... | |
!SignDocAnnotation () | |
Finalizer. More... | |
AnnotationType | getType () |
Get the type of the annotation. More... | |
string | getName () |
Get the name of the annotation. More... | |
int | getPage () |
Get the page number of the annotation. More... | |
Rect | getBoundingBox () |
Get the bounding box of the annotation. More... | |
void | setName (out ReturnCode aReturnCode, string aName) |
Set the name of the annotation. More... | |
void | setLineEnding (out ReturnCode aReturnCode, LineEnding aStart, LineEnding aEnd) |
Set line ending styles. More... | |
void | setColor (out ReturnCode aReturnCode, SignDocColor aColor) |
Set the foreground color of the annotation. More... | |
void | setBackgroundColor (out ReturnCode aReturnCode, SignDocColor aColor) |
Set the background color of the annotation. More... | |
void | setBorderColor (out ReturnCode aReturnCode, SignDocColor aColor) |
Set the border color of the annotation. More... | |
void | setOpacity (out ReturnCode aReturnCode, double aOpacity) |
Set the opacity of the annotation. More... | |
void | setLineWidthInPoints (out ReturnCode aReturnCode, double aWidth) |
Set line width in points. More... | |
void | setBorderLineWidthInPoints (out ReturnCode aReturnCode, double aWidth) |
Set border line width in points. More... | |
void | newStroke (out ReturnCode aReturnCode) |
Start a new stroke in a scribble annotation. More... | |
void | addPoint (out ReturnCode aReturnCode, Point aPoint) |
Add a point to the current stroke of a scribble annotation. More... | |
void | addPoint (out ReturnCode aReturnCode, double aX, double aY) |
Add a point to the current stroke of a scribble annotation. More... | |
void | setPlainText (out ReturnCode aReturnCode, string aText, string aFont, double aFontSize, AnnotationHAlignment aHAlignment) |
Set the text of a text annotation. More... | |
string | getPlainText (out ReturnCode aReturnCode) |
Get the plain text of a text annotation. More... | |
string | getFont (out ReturnCode aReturnCode) |
Get the font of a text annotation. More... | |
double? | getFontSize (out ReturnCode aReturnCode) |
Get the font size of a text annotation. More... | |
void | setFlags (out ReturnCode aReturnCode, AnnotationFlags aFlags) |
Set flags. More... | |
string | getErrorMessage () |
Get an error message for the last function call. More... | |
An annotation.
Currently, annotations are supported for PDF documents only.
~SignDocAnnotation | ( | ) |
Destructor.
!SignDocAnnotation | ( | ) |
Finalizer.
void addPoint | ( | out ReturnCode | aReturnCode, |
Point | aPoint | ||
) |
Add a point to the current stroke of a scribble annotation.
This function can be used for annotations of type AnnotationType.Scribble. Each stroke must contain at least two points. This function uses document (page) coordinates, see Coordinate Systems.
[out] | aReturnCode | The return code, ReturnCode.OK iff successful. |
[in] | aPoint | The point to be added. |
void addPoint | ( | out ReturnCode | aReturnCode, |
double | aX, | ||
double | aY | ||
) |
Add a point to the current stroke of a scribble annotation.
This function can be used for annotations of type AnnotationType.Scribble. Each stroke must contain at least two points. This function uses document (page) coordinates, see Coordinate Systems.
[out] | aReturnCode | The return code, ReturnCode.OK iff successful. |
[in] | aX | The X coordinate of the point. |
[in] | aY | The Y coordinate of the point. |
Rect getBoundingBox | ( | ) |
Get the bounding box of the annotation.
The bounding box is available for objects returned by SignDocDocument.getAnnotation() only.
string getErrorMessage | ( | ) |
Get an error message for the last function call.
string getFont | ( | out ReturnCode | aReturnCode | ) |
Get the font of a text annotation.
[out] | aReturnCode | The return code, ReturnCode.OK iff successful. |
double? getFontSize | ( | out ReturnCode | aReturnCode | ) |
Get the font size of a text annotation.
[out] | aReturnCode | The return code, ReturnCode.OK iff successful. |
string getName | ( | ) |
Get the name of the annotation.
int getPage | ( | ) |
Get the page number of the annotation.
The page number is available for objects returned by SignDocDocument.getAnnotation() only.
string getPlainText | ( | out ReturnCode | aReturnCode | ) |
Get the plain text of a text annotation.
[out] | aReturnCode | The return code, ReturnCode.OK iff successful. |
AnnotationType getType | ( | ) |
Get the type of the annotation.
void newStroke | ( | out ReturnCode | aReturnCode | ) |
Start a new stroke in a scribble annotation.
This function can be used for annotations of type AnnotationType.Scribble. Each stroke must contain at least two points. This function need not be called for the first stroke of a scribble annotation.
[out] | aReturnCode | The return code, ReturnCode.OK iff successful. |
void setBackgroundColor | ( | out ReturnCode | aReturnCode, |
SignDocColor | aColor | ||
) |
Set the background color of the annotation.
This function can be used for annotations of type AnnotationType.FreeText.
The default background color is white.
[out] | aReturnCode | The return code, ReturnCode.OK iff successful. |
[in] | aColor | The background color of the annotation. |
void setBorderColor | ( | out ReturnCode | aReturnCode, |
SignDocColor | aColor | ||
) |
Set the border color of the annotation.
This function can be used for annotations of type AnnotationType.FreeText.
The default border color is black.
[out] | aReturnCode | The return code, ReturnCode.OK iff successful. |
[in] | aColor | The border color of the annotation. |
void setBorderLineWidthInPoints | ( | out ReturnCode | aReturnCode, |
double | aWidth | ||
) |
Set border line width in points.
This function can be used for annotations of type AnnotationType.FreeText. The default border line width for PDF documents is 1 point.
[out] | aReturnCode | The return code, ReturnCode.OK iff successful. |
[in] | aWidth | The border line width in points (1/72 inch). If this value is negative, no border lines will be drawn. |
void setColor | ( | out ReturnCode | aReturnCode, |
SignDocColor | aColor | ||
) |
Set the foreground color of the annotation.
This function can be used for annotations of types AnnotationType.Line, AnnotationType.Scribble, and AnnotationType.FreeText.
The default foreground color is black.
[out] | aReturnCode | The return code, ReturnCode.OK iff successful. |
[in] | aColor | The foreground color of the annotation. |
void setFlags | ( | out ReturnCode | aReturnCode, |
AnnotationFlags | aFlags | ||
) |
Set flags.
This function can be used for annotations of type AnnotationType.FreeText. Initially, no flag is set.
[out] | aReturnCode | The return code, ReturnCode.OK iff successful. |
[in] | aFlags | See AnnotationFlags. |
void setLineEnding | ( | out ReturnCode | aReturnCode, |
LineEnding | aStart, | ||
LineEnding | aEnd | ||
) |
Set line ending styles.
This function can be used for annotations of type AnnotationType.Line. The default line ending style is LineEnding.None.
[out] | aReturnCode | The return code, ReturnCode.OK iff successful. |
[in] | aStart | Line ending style for start point. |
[in] | aEnd | Line ending style for end point. |
void setLineWidthInPoints | ( | out ReturnCode | aReturnCode, |
double | aWidth | ||
) |
Set line width in points.
This function can be used for annotations of types AnnotationType.Line and AnnotationType.Scribble. The default line width for PDF documents is 1 point.
[out] | aReturnCode | The return code, ReturnCode.OK iff successful. |
[in] | aWidth | The line width in points (1/72 inch). |
void setName | ( | out ReturnCode | aReturnCode, |
string | aName | ||
) |
Set the name of the annotation.
In PDF documents, an annotation can have a name. The names of annotations must be unique within a page. By default, annotations are unnamed.
[out] | aReturnCode | The return code, ReturnCode.OK iff successful. |
[in] | aName | The name of the annotation. |
void setOpacity | ( | out ReturnCode | aReturnCode, |
double | aOpacity | ||
) |
Set the opacity of the annotation.
This function can be used for annotations of types AnnotationType.Line, AnnotationType.Scribble, and AnnotationType.FreeText.
The default opacity is 1.0. Documents conforming to PDF/A-1 must use an opacity of 1.0.
[out] | aReturnCode | The return code, ReturnCode.OK iff successful. |
[in] | aOpacity | The opacity, 0.0 (transparent) through 1.0 (opaque). |
void setPlainText | ( | out ReturnCode | aReturnCode, |
string | aText, | ||
string | aFont, | ||
double | aFontSize, | ||
AnnotationHAlignment | aHAlignment | ||
) |
Set the text of a text annotation.
This function can be used for annotations of type AnnotationType.FreeText.
Any sequence of CR and LF characters in the text starts a new paragraph (ie, text following such a sequence will be placed at the beginning of the next output line). In consequence, empty lines in the input do not produce empty lines in the output. To get an empty line in the output, you have to add a paragraph containing a non-breaking space (0xa0) only:
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.
[out] | aReturnCode | The return code, ReturnCode.OK iff successful. |
[in] | aText | The text. Allowed control characters are CR and LF. Any sequence of CR and LF characters starts a new paragraph. Escape sequences must not be used. |
[in] | aFont | The name of the font to be used. The font substitition rules of the loaded font configuration files will be used. The resulting font must be a standard PDF font or a font for which a file is specified in the font configuration files. |
[in] | aFontSize | The font size in user space units. |
[in] | aHAlignment | Horizontal alignment of the text. |