DynaPDF Manual - Page 834
Previous Page 833 Index Next Page 835

Function Reference
Page 834 of 860
The interfaces for C#, Delphi, VB .Net, and VB 6 convert the password automatically to UTF8. It is
not required to enable UTF8 support beforehand when using these programming languages.
Return values:
If the supplied password is correct the return value is 1, otherwise the return value is 0.
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.
PosX / PosY represents always the upper left corner of the annotation, independent of the used
coordinate system. This is different in comparison to all other annotations because text annotations
are never scaled or rotated with a page. The upper left corner of the scaled bounding box is the
reference point on which the icon is rendered. Therefore, this is the only stable point at different
zoom factors.
If the parameter Open is true, the annotation appears in its open state when opening the document.
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.
Previous topic: TestGlyphs, TestGlyphsEx, TestPassword
Next topic: TranslateCoords, TranslateRawCode (Font API)