THotPDF.AddLoadedFreeTextAnnotationRichText Method
在已載入頁面上加入 FreeText 標記附註,除了純文字 /Contents 之外,還將豐富文字外觀儲存在 /RC
宣告
procedure AddLoadedFreeTextAnnotationRichText(PageIndex: Integer; X1, Y1, X2, Y2: Single; const AText: AnsiString; const RichContent: AnsiString; const DefaultStyle: AnsiString = '');
單元
HPDFDoc
參數
| 名稱 | 用途 |
|---|---|
PageIndex | 接收此附註之已載入頁面的 0 起始索引 |
X1, Y1, X2, Y2 | 以 PDF 使用者空間點數表示的附註矩形 |
AText | 檢視器不算繪豐富內容時顯示的純文字 /Contents 後備內容 |
RichContent | 寫入 /RC 的 XML 片段(PDF 1.5 表 8.70 / 12.5.6.16);傳入 '' 可維持僅含 Contents 的純文字附註,否則 RC 的優先順序高於 AText |
DefaultStyle | 選用的 /DS 預設樣式字串,會套用到豐富內容 |
傳回值
此成員不傳回值
使用說明
- 檢視器解譯 RC 的方式與欄位層級的 /RV 豐富文字相同
- 使用 THotPDF.SetLoadedFreeTextRichText 更新既有 FreeText 附註的豐富內容