THPDFPage.AddFreeTextAnnotation

THPDFPage

 

顶部  上一页  下一页

Adds new FreeText annotation on the current page.

 

type

  THPDFFreeTextAnnotationJust = ( ftLeftJust, ftCenter, ftRightJust );

 

Delphi 语法:

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

 

C++ 语法:

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

 

说明

使用 AddFreeTextAnnotation,在当前页面上添加新的 FreeText annotation,并指定 text message(Contents)、rectangle area(Rectangle)、justification(Quadding)和 color

 

Value                Meaning


ftLeftJust                    Left justification.

ftCenter                Center justification.

ftRightJust                Right justification.

 

 

超出 ASCII 的内容(中文、日文、韩文、阿拉伯文、西里尔文等)通过 AnsiString 重载以 UTF-8 传入,或作为 WideString 传入。这类注释会获得自己的外观,用页面当前字体以 12 pt 绘制文本,因此添加注释前先用 SetFont 选一个覆盖这些字符的字体。字体会随页面文本一起嵌入,文本行在矩形内折行并遵循 Quadding。纯 ASCII 内容保持普通注释,由阅读器用 Helvetica 绘制;在 PDF/A 和 PDF/X 下不允许未嵌入的 Helvetica,同样会用已嵌入的页面字体绘制

Free text annotation preview