-
Notifications
You must be signed in to change notification settings - Fork 2
API: Annotation
HPDF_STATUS HPDF_LinkAnnot_SetHighlightMode (HPDF_Annotation annot, HPDF_AnnotHighlightMode mode);
Description
HPDF_LinkAnnot_SetHighlightMode() defines the appearance when a mouse clicks on a link annotation. (see example program)
Parameters
annot - The handle of an annotation object.
mode - One of the following values:
HPDF_ANNOT_NO_HIGHTLIGHT | No highlighting. |
HPDF_ANNOT_INVERT_BOX | Invert the contents of the area of annotation. |
HPDF_ANNOT_INVERT_BORDER | Invert the annotation's border. |
HPDF_ANNOT_DOWN_APPEARANCE | Dent the annotation. |
Return Value
Returns HPDF_OK on success. Otherwise, returns error code and error-handler is invoked.
Error codes
- HPDF_INVALID_ANNOTATION - An invalid annotation handle was set.
- HPDF_FAILD_TO_ALLOC_MEM - Memory allocation failed.
HPDF_STATUS HPDF_LinkAnnot_SetBorderStyle (HPDF_Annotation annot, HPDF_REAL width, HPDF_UINT16 dash_on, HPDF_UINT16 dash_off);
Description
HPDF_LinkAnnot_SetBorderStyle() defines the style of the annotation's border.
Parameters
annot - The handle of an annotation object.
width - The width of an annotation's border.
dash_on, dash_off - The dash style.
Return Value
Returns HPDF_OK on success. Otherwise, returns error code and error-handler is invoked.
Error codes
- HPDF_INVALID_ANNOTATION - An invalid annotation handle was set.
- HPDF_INVALID_PARAMETER - An invalid width value was set.
- HPDF_FAILD_TO_ALLOC_MEM - Memory allocation failed.
HPDF_STATUS HPDF_TextAnnot_SetIcon (HPDF_Annotation annot, HPDF_AnnotIcon icon);
Description
HPDF_TextAnnot_SetIcon() defines the style of the annotation's icon. (see example program)
Parameters
annot - The handle of an annotation object.
icon - The style of icon. The following values are available.
- HPDF_ANNOT_ICON_COMMENT
- HPDF_ANNOT_ICON_KEY
- HPDF_ANNOT_ICON_NOTE
- HPDF_ANNOT_ICON_HELP
- HPDF_ANNOT_ICON_NEW_PARAGRAPH
- HPDF_ANNOT_ICON_PARAGRAPH
- HPDF_ANNOT_ICON_INSERT
Returns HPDF_OK on success. Otherwise, returns error code and error-handler is invoked.
Error codes
- HPDF_INVALID_ANNOTATION - An invalid annotation handle was set.
- HPDF_ANNOT_INVALID_ICON - An invalid icon-style was specified.
- HPDF_FAILD_TO_ALLOC_MEM - Memory allocation failed.
HPDF_STATUS HPDF_TextAnnot_SetOpened (HPDF_Annotation annot, HPDF_BOOL open);
Description
HPDF_TextAnnot_SetOpened() defines whether the text-annotation is initially open.
Parameters
annot - The handle of an annotation object.
open - HPDF_TRUE means the annotation initially displayed open.
Return Value
Returns HPDF_OK on success. Otherwise, returns error code and error-handler is invoked.
Error codes
- HPDF_INVALID_ANNOTATION - An invalid annotation handle was set.
- HPDF_FAILD_TO_ALLOC_MEM - Memory allocation failed.
HPDF_STATUS HPDF_Annotation_SetBorderStyle (HPDF_Annotation annot, HPDF_BSSubtype subtype, HPDF_REAL width, HPDF_UINT16 dash_on, HPDF_UINT16 dash_off, HPDF_UINT16 dash_phase);
Description
HPDF_Annotation_SetBorderStyle() defines the appearance of a text annotation.
Parameters
annot - The handle of an annotation object.
subtype - One of the following subtypes:
HPDF_BS_SOLID | Solid rectangle |
HPDF_BS_DASHED | Dashed rectangle |
HPDF_BS_BEVELED | Embossed rectangle |
HPDF_BS_INSET | Engraved rectangle |
HPDF_BS_UNDERLINED | Single line under the bottom of the annotation |
width - The width of an annotation's border.
dash_on, dash_off, dash_phase - The dash style.
Return Value
Returns HPDF_OK on success. Otherwise, returns error code and error-handler is invoked.