AddFreeTextAnnotation

文本、注释和热点链接

描述

向所选页面添加自由文本注释。若使用 Options 参数指定边框和/或填充,则从当前线条颜色、填充颜色、线宽和画笔虚线设置中获取设置

SetLineColor 不影响边框颜色。由于 Acrobat 的工作方式,边框颜色当前设置为与文本颜色相同。SelectFont 不影响字体样式。由于 Acrobat 的工作方式,字体当前硬编码为标准 Helvetica 字体

SetTextSize 将正确影响文本大小;SetTextColor 将正确影响文本颜色;SetLineWidth 将正确调整边框宽度;SetTextAlign 将正确调整文本对齐方式

SetTransparency 函数*不会*改变注释的透明度。请使用新的

当所选文档低于 PDF 1.3 时,写入器会自动将有效 PDF 版本提升到 1.3,因为自由文本注释是在 PDF 1.3 中引入的

AddFreeTextAnnotationEx 函数调整透明度设置

语法

Delphi

Function TPDFlib.AddFreeTextAnnotation(Left, Top, Width, Height: Double; Const Text: WideString; Angle, Options: Integer): Integer;

ActiveX

Function PDFlib::AddFreeTextAnnotation(Left As Double, Top As Double, Width As Double, Height As Double, Text As String, Angle As Long, Options As Long) As Long

DLL

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

参数

Left注释矩形左边缘的水平坐标
Top注释矩形左边缘的垂直坐标
Width注释矩形的宽度 注释矩形的高度
Height注释的文本内容
Text
Angle所绘制文本的角度,可以是 0、90、180 或 270
Options0 = 轮廓;1 = 填充;2 = 填充和轮廓 int Options)