An annotation. More...
Public Member Functions | |
| synchronized int | getType () throws SignDocException |
| Get the type of the annotation. | |
| synchronized String | getName () throws SignDocException |
| Get the name of the annotation. | |
| synchronized int | getPage () throws SignDocException |
| Get the page number of the annotation. | |
| synchronized Rect | getBoundingBox () throws SignDocException |
| Get the bounding box of the annotation. | |
| synchronized int | setName (String aName) throws SignDocException |
| Set the name of the annotation. | |
| synchronized int | setLineEnding (int aStart, int aEnd) throws SignDocException |
| Set line ending styles. | |
| synchronized int | setColor (SignDocColor aColor) throws SignDocException |
| Set the color of the annotation. | |
| synchronized int | setBackgroundColor (SignDocColor aColor) throws SignDocException |
| Set the background color of the annotation. | |
| synchronized int | setBorderColor (SignDocColor aColor) throws SignDocException |
| Set the border color of the annotation. | |
| synchronized int | setOpacity (double aOpacity) throws SignDocException |
| Set the opacity of the annotation. | |
| synchronized int | setLineWidthInPoints (double aWidth) throws SignDocException |
| Set line width in points. | |
| synchronized int | setBorderLineWidthInPoints (double aWidth) throws SignDocException |
| Set border line width in points. | |
| synchronized int | newStroke () throws SignDocException |
| Start a new stroke in a scribble annotation. | |
| synchronized int | addPoint (Point aPoint) throws SignDocException |
| Add a point to the current stroke of a scribble annotation. | |
| synchronized int | addPoint (double aX, double aY) throws SignDocException |
| Add a point to the current stroke of a scribble annotation. | |
| synchronized int | setPlainText (String aText, String aFont, double aFontSize, int aHAlignment) throws SignDocException |
| Set the text of a text annotation. | |
| synchronized String | getPlainText () throws SignDocException |
| Get the plain text of a text annotation. | |
| synchronized String | getFont () throws SignDocException |
| Get the font of a text annotation. | |
| synchronized Double | getFontSize () throws SignDocException |
| Get the font size of a text annotation. | |
Static Public Attributes | |
| static final int | t_unknown = 0 |
| Annotation type: Unknown annotation type. | |
| static final int | t_line = 1 |
| Annotation type: Line annotation. | |
| static final int | t_scribble = 2 |
| Annotation type: Scribble annotation (freehand scribble). | |
| static final int | t_freetext = 3 |
| Annotation type: Text annotation. | |
| static final int | le_unknown = 0 |
| Line ending style: Unknown line ending style. | |
| static final int | le_none = 1 |
| Line ending style: No line ending. | |
| static final int | le_arrow = 2 |
| Line ending style: Two short lines forming an arrowhead. | |
| static final int | ha_left = 0 |
| Horizontal alignment: left. | |
| static final int | ha_center = 1 |
| Horizontal alignment: center. | |
| static final int | ha_right = 2 |
| Horizontal alignment: right. | |
| static final int | rc_ok = 0 |
| Return code: Parameter set successfully. | |
| static final int | rc_not_supported = 1 |
| Return code: Setting the parameter is not supported. | |
| static final int | rc_invalid_value = 2 |
| Return code: The value for the parameter is invalid. | |
Protected Member Functions | |
| void | finalize () throws Throwable |
| Finalize this object. | |
An annotation.
| synchronized int de.softpro.doc.SignDocAnnotation.addPoint | ( | Point | aPoint ) | throws SignDocException |
Add a point to the current stroke of a scribble annotation.
This function can be used for annotations of type t_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. |
| synchronized int de.softpro.doc.SignDocAnnotation.addPoint | ( | double | aX, |
| double | aY | ||
| ) | throws SignDocException |
Add a point to the current stroke of a scribble annotation.
This function can be used for annotations of type t_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. |
| void de.softpro.doc.SignDocAnnotation.finalize | ( | ) | throws Throwable [protected] |
Finalize this object.
Do not call this method unless you know what you are doing.
| synchronized Rect de.softpro.doc.SignDocAnnotation.getBoundingBox | ( | ) | throws SignDocException |
Get the bounding box of the annotation.
The bounding box is available for objects returned by getAnnotation() only.
| synchronized String de.softpro.doc.SignDocAnnotation.getFont | ( | ) | throws SignDocException |
Get the font of a text annotation.
| synchronized Double de.softpro.doc.SignDocAnnotation.getFontSize | ( | ) | throws SignDocException |
Get the font size of a text annotation.
| synchronized String de.softpro.doc.SignDocAnnotation.getName | ( | ) | throws SignDocException |
Get the name of the annotation.
| synchronized int de.softpro.doc.SignDocAnnotation.getPage | ( | ) | throws SignDocException |
Get the page number of the annotation.
The page number is available for objects returned by SignDocDocument.getAnnotation() only.
| synchronized String de.softpro.doc.SignDocAnnotation.getPlainText | ( | ) | throws SignDocException |
Get the plain text of a text annotation.
| synchronized int de.softpro.doc.SignDocAnnotation.getType | ( | ) | throws SignDocException |
Get the type of the annotation.
| synchronized int de.softpro.doc.SignDocAnnotation.newStroke | ( | ) | throws SignDocException |
Start a new stroke in a scribble annotation.
This function can be used for annotations of type t_scribble. Each stroke must contain at least two points. This function need not be called for the first stroke of a scribble annotation.
| synchronized int de.softpro.doc.SignDocAnnotation.setBackgroundColor | ( | SignDocColor | aColor ) | throws SignDocException |
Set the background color of the annotation.
This function can be used for annotations of type t_freetext.
The default background color is white.
| [in] | aColor | The background color of the annotation. |
| synchronized int de.softpro.doc.SignDocAnnotation.setBorderColor | ( | SignDocColor | aColor ) | throws SignDocException |
Set the border color of the annotation.
This function can be used for annotations of type t_freetext. The default border color is black.
| [in] | aColor | The border color of the annotation. |
| synchronized int de.softpro.doc.SignDocAnnotation.setBorderLineWidthInPoints | ( | double | aWidth ) | throws SignDocException |
Set border line width in points.
This function can be used for annotations of type t_freetext. The default 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. |
| synchronized int de.softpro.doc.SignDocAnnotation.setColor | ( | SignDocColor | aColor ) | throws SignDocException |
Set the color of the annotation.
This function can be used for annotations of types t_line and t_scribble. The default color is black.
| [in] | aColor | The color of the annotation. |
| synchronized int de.softpro.doc.SignDocAnnotation.setLineEnding | ( | int | aStart, |
| int | aEnd | ||
| ) | throws SignDocException |
| synchronized int de.softpro.doc.SignDocAnnotation.setLineWidthInPoints | ( | double | aWidth ) | throws SignDocException |
Set line width in points.
This function can be used for annotations of types t_line and t_scribble. The default line width for PDF documents is 1 point.
| [in] | aWidth | The line width in points (1/72 inch). |
| synchronized int de.softpro.doc.SignDocAnnotation.setName | ( | String | aName ) | throws SignDocException |
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. |
| synchronized int de.softpro.doc.SignDocAnnotation.setOpacity | ( | double | aOpacity ) | throws SignDocException |
Set the opacity of the annotation.
This function can be used for annotations of types t_line and t_scribble.
The default opacity is 1.0. Documents conforming to PDF/A must use an opacity of 1.0.
| [in] | aOpacity | The opacity, 0.0 (transparent) through 1.0 (opaque). |
| synchronized int de.softpro.doc.SignDocAnnotation.setPlainText | ( | String | aText, |
| String | aFont, | ||
| double | aFontSize, | ||
| int | aHAlignment | ||
| ) | throws SignDocException |
Set the text of a text annotation.
This function can be used for annotations of type t_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:
"Line before empty line\n\u00A0\nLine after empty line"
| [in] | aText | The text. Allowed control characters are CR and LF. Any sequence of CR and LF characters starts a new paragraph. |
| [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 (ha_left, ha_center, ha_right). |
final int de.softpro.doc.SignDocAnnotation.ha_center = 1 [static] |
Horizontal alignment: center.
final int de.softpro.doc.SignDocAnnotation.ha_left = 0 [static] |
Horizontal alignment: left.
final int de.softpro.doc.SignDocAnnotation.ha_right = 2 [static] |
Horizontal alignment: right.
final int de.softpro.doc.SignDocAnnotation.le_arrow = 2 [static] |
Line ending style: Two short lines forming an arrowhead.
final int de.softpro.doc.SignDocAnnotation.le_none = 1 [static] |
Line ending style: No line ending.
final int de.softpro.doc.SignDocAnnotation.le_unknown = 0 [static] |
Line ending style: Unknown line ending style.
final int de.softpro.doc.SignDocAnnotation.rc_invalid_value = 2 [static] |
Return code: The value for the parameter is invalid.
final int de.softpro.doc.SignDocAnnotation.rc_not_supported = 1 [static] |
Return code: Setting the parameter is not supported.
final int de.softpro.doc.SignDocAnnotation.rc_ok = 0 [static] |
Return code: Parameter set successfully.
final int de.softpro.doc.SignDocAnnotation.t_freetext = 3 [static] |
Annotation type: Text annotation.
final int de.softpro.doc.SignDocAnnotation.t_line = 1 [static] |
Annotation type: Line annotation.
final int de.softpro.doc.SignDocAnnotation.t_scribble = 2 [static] |
Annotation type: Scribble annotation (freehand scribble).
final int de.softpro.doc.SignDocAnnotation.t_unknown = 0 [static] |
Annotation type: Unknown annotation type.
1.7.2