THotPDF.SetLoadedAnnotationContents Method
替换选定已加载注释的 /Contents 字符串,并失效其所在页面的渲染缓存
该方法保留既有外观和富文本;仅修改 /Contents 不会重建 /AP
声明
procedure SetLoadedAnnotationContents(PageIndex, AnnotationIndex: Integer; const AContents: AnsiString);
单元
HPDFDoc
参数
| 名称 | 用途 |
|---|---|
PageIndex | 目标页面的从零开始的索引 |
AnnotationIndex | 页面注释数组中目标注释的从零开始的索引 |
AContents | 要写入注释 Contents 条目的新文本字符串 |
返回值
该成员不返回值
使用注意事项
- Contents 字段是注释的主要文字内容,对于 Text 和 FreeText 注释类型,它直接显示为批注气泡中的文字
- 需要把受支持的 FreeText 注释显式转换成全新的可见 ASCII Helvetica 外观时,请使用
SetLoadedFreeTextPlainText - 富文本元数据走单独的工作流,请使用
SetLoadedFreeTextRichText