THotPDF.AddLoadedFreeTextAnnotationRichText Method
向已加载的页面添加 FreeText 标记注释,其富文本外观存储在 /RC 中,同时保留纯文本的 /Contents
声明
procedure AddLoadedFreeTextAnnotationRichText(PageIndex: Integer; X1, Y1, X2, Y2: Single; const AText: AnsiString; const RichContent: AnsiString; const DefaultStyle: AnsiString = '');
单元
HPDFDoc
参数
| 名称 | 用途 |
|---|---|
PageIndex | 接收该注释的已加载页面的从零开始的索引 |
X1, Y1, X2, Y2 | Annotation rectangle in PDF user space points |
AText | 纯文本的 /Contents 回退内容,在 Viewer 不渲染富文本时显示 |
RichContent | 写入 /RC 的 XML 片段(PDF 1.5 Table 8.70 / 12.5.6.16);传入 '' 则保持仅含 Contents 的纯文本注释,否则 RC 的优先级高于 AText |
DefaultStyle | 应用于富文本内容的可选 /DS 默认样式字符串 |
返回值
此成员不返回值
使用说明
- Viewer 对 RC 的解释方式与字段级 /RV 富文本相同
- 如需更新已有 FreeText 注释的富文本内容,请使用 THotPDF.SetLoadedFreeTextRichText