Skip to content

编辑注释

编辑注释的步骤如下:

​ 1.获取需要编辑注释的页面对象。

​ 2.获取该页面的注释列表。

​ 3.在注释列表中寻找想要编辑的注释,并将其转换为合适的子类型。

​ 4.将属性设置到注释对象中。

​ 5.更新注释外观使其显示在文档上。

以下是编辑文本注释属性的代码:

C#
CPDFTextAnnotation textAnnotation = annotList[0] as CPDFTextAnnotation; 
CTextAttribute textAttribute = new CTextAttribute()
{
	FontColor = new byte[] { 255, 0, 0 }, 
	FontSize = 20,
	FontName = "Helvitical"
};
textAnnotation.SetTextAttribute(textAttribute);
textAnnotation.UpdateAp();