AddFreeTextAnnotationA

Text, Annotations and hotspot links

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to AddFreeTextAnnotation and string arguments are interpreted using the current SetAnsiMode code page

Adds a free text annotation to the selected page; If a border and/or fill is specified using the Options parameter then the settings are retrieved from the current line colour, fill colour, line width, pen dash settings

SetLineColor does not affect border colour; Border colour is currently set to the same colour as the text colour due to the way Acrobat works; SelectFont does not affect font style; Currently the font is hardcoded to the standard Helvetica font due to the way Acrobat works

SetTextSize will affect text size correctly SetTextColor will affect text colour correctly SetLineWidth will adjust border width correctly SetTextAlign will adjust text alignment correctly

The SetTransparency function will *not* change the transparency of annotations; Use the new

When the selected document is below PDF 1.3, the writer automatically raises the effective PDF version to 1.3 because free text annotations were introduced in PDF 1.3

AddFreeTextAnnotationEx function if you want to adjust transparency settings

Syntax

Delphi

Function DLAddFreeTextAnnotationA(InstanceID: Integer; Left, Top, Width, Height: Double; Text: PAnsiChar; Angle, Options: Integer): Integer;

DLL

int DLAddFreeTextAnnotationA(int InstanceID, double Left, double Top, double Width, double Height, const char * Text, int Angle, int Options);

Parameters

LeftThe horizontal coordinate of the left edge of the annotation rectangle
TopThe vertical coordinate of the left edge of the annotation rectangle
WidthThe width of the annotation rectangle The height of the annotation rectangle
HeightThe text content of the annotation
Text
AngleThe angle of the drawn text; Can be 0, 90, 180 or 270
Options0 = Outline 1 = Fill 2 = Fill and Outline int Options);