THPDFPage.AddFreeTextAnnotation

THPDFPage

 

Top  Previous  Next

Adds new FreeText annotation on the current page.

 

type

  THPDFFreeTextAnnotationJust = ( ftLeftJust, ftCenter, ftRightJust );

 

Delphi syntax:

procedure AddFreeTextAnnotation ( Contents: AnsiString; Rectangle: TRect; Quadding: THPDFFreeTextAnnotationJust; Color: TColor = clRed );

 

C++ syntax:

void __fastcall AddFreeTextAnnotation ( AnsiString Contents, Windows::TRect &Rectangle, THPDFFreeTextAnnotationJust Quadding, Graphics::TColor Color );

 

Description

Use AddFreeTextAnnotation to add new FreeText annotation specified text message ( Contents), rectangle area ( Rectangle ), justification ( Quadding ) and color on the current page.  

 

Value                Meaning


ftLeftJust                    Left justification.

ftCenter                Center justification.

ftRightJust                Right justification.

 

Contents beyond ASCII (Chinese, Japanese, Korean, Arabic, Cyrillic and so on) are passed as UTF-8 through the AnsiString overload or as a WideString. Such an annotation gets its own appearance that draws the text at 12 pt in the page's current font, so select a font that covers the characters with SetFont before adding the annotation. The font is embedded together with the page text, the lines wrap to the rectangle and follow Quadding. ASCII-only contents keep the plain annotation, which viewers draw in Helvetica; under PDF/A and PDF/X, where an unembedded Helvetica is not allowed, they are drawn in the embedded page font as well

 

Free text annotation preview