SignDoc SDK (.NET with 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 (string aName) |
Set the name of the annotation. More... | |
void | setLineEnding (LineEnding aStart, LineEnding aEnd) |
Set line ending styles. More... | |
void | setColor (SignDocColor aColor) |
Set the foreground color of the annotation. More... | |
void | setBackgroundColor (SignDocColor aColor) |
Set the background color of the annotation. More... | |
void | setBorderColor (SignDocColor aColor) |
Set the border color of the annotation. More... | |
void | setOpacity (double aOpacity) |
Set the opacity of the annotation. More... | |
void | setLineWidthInPoints (double aWidth) |
Set line width in points. More... | |
void | setBorderLineWidthInPoints (double aWidth) |
Set border line width in points. More... | |
void | newStroke () |
Start a new stroke in a scribble annotation. More... | |
void | addPoint (Point aPoint) |
Add a point to the current stroke of a scribble annotation. More... | |
void | addPoint (double aX, double aY) |
Add a point to the current stroke of a scribble annotation. More... | |
void | setPlainText (string aText, string aFont, double aFontSize, AnnotationHAlignment aHAlignment) |
Set the text of a text annotation. More... | |
string | getPlainText () |
Get the plain text of a text annotation. More... | |
string | getFont () |
Get the font of a text annotation. More... | |
double? | getFontSize () |
Get the font size of a text annotation. More... | |
void | setFlags (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 | ( | 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.
[in] | aPoint | The point to be added. |
void addPoint | ( | 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.
[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 | ( | ) |
Get the font of a text annotation.
double? getFontSize | ( | ) |
Get the font size of a text annotation.
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 | ( | ) |
Get the plain text of a text annotation.
AnnotationType getType | ( | ) |
Get the type of the annotation.
void newStroke | ( | ) |
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.
void setBackgroundColor | ( | 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.
[in] | aColor | The background color of the annotation. |
void setBorderColor | ( | 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.
[in] | aColor | The border color of the annotation. |
void setBorderLineWidthInPoints | ( | 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.
[in] | aWidth | The border line width in points (1/72 inch). If this value is negative, no border lines will be drawn. |
void setColor | ( | 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.
[in] | aColor | The foreground color of the annotation. |
void setFlags | ( | AnnotationFlags | aFlags | ) |
Set flags.
This function can be used for annotations of type AnnotationType.FreeText. Initially, no flag is set.
[in] | aFlags | See AnnotationFlags. |
void setLineEnding | ( | 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.
[in] | aStart | Line ending style for start point. |
[in] | aEnd | Line ending style for end point. |
void setLineWidthInPoints | ( | 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.
[in] | aWidth | The line width in points (1/72 inch). |
void setName | ( | 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.
[in] | aName | The name of the annotation. |
void setOpacity | ( | 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.
[in] | aOpacity | The opacity, 0.0 (transparent) through 1.0 (opaque). |
void setPlainText | ( | 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.
[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. |