DynaPDF Manual - Page 752

Previous Page 751   Index   Next Page 753

Function Reference
Page 752 of 777
TextAnnot
Syntax:
SI32 pdfTextAnnot(
const PPDF* IPDF,
// Instance pointer
double PosX,
// X-Coordinate of the annotation
double PosY,
// Y-Coordinate of the annotation
double Width,
// Width of the window in open state
double Height,
// Height of the window in open state
const char* Author, // Author of the annotation or NULL
const char* Text,
// The annotation's Text or NULL
TAnnotIcon Icon,
// Annotation icon, see below
LBOOL Open)
// Should the annotation appear open or closed?
typedef enum
{
aiComment,
aiHelp,
aiInsert,
aiKey,
aiNewParagraph,
aiNote,
aiParagraph,
aiUserDefined // Internal, not usable!
}TAnnotIcon;
The function creates a text annotation. The parameters Width and Height define the size of the
annotation's window. The window is shown in the open state of the annotation.
If the parameter Open is true, the annotation appears in its open state when opening the document. If
the annotation is closed, the annotation's icon appears on screen.
The parameters Author and Text are optional, they can be NULL.
Remarks:
This function is implemented in an Ansi and Unicode compatible version. The Ansi Version
supports Ansi strings of the code page 1252 only. To create a text annotation in an arbitrary encoding
convert the string to Unicode with the function ConvToIncode()and use the Unicode version to
create the annotation.
Return values:
If the function succeeds the return value is the annotation handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
 

Previous topic: StrokePath, TestGlyphs, TestGlyphsEx

Next topic: TranslateCoords