AddFreeTextAnnotation
文字、註解與熱點連結
描述
在所選頁面加入自由文字註解。若以 Options 參數指定框線和/或填色,設定會取自目前的線條顏色、填色顏色、線寬與筆劃虛線設定
SetLineColor 不影響框線顏色。受 Acrobat 運作方式所限,框線顏色目前固定使用與文字顏色相同的顏色。SelectFont 不影響字型樣式,字型目前寫死為標準 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。 |
| Options | 0 = 外框 1 = 填色 2 = 填色加外框 int Options); |