PdfAnnotationEditor.ModifyAnnotations

PdfAnnotationEditor.ModifyAnnotations 方法

修改指定页面范围内指定类型的注释。它支持修改下列注释属性:修改过的、标题、内容、颜色、主题和打开状态。

public void ModifyAnnotations(int start, int end, Annotation annotation)
参数类型描述
startInt32起始页码。
endInt32结束页码。
annotationAnnotation包含新属性的注释对象。

示例

PdfAnnotationEditor editor = new PdfAnnotationEditor();
editor.BindPdf("example.pdf");
TextAnnotation annot = new TextAnnotation();
annot.Modified = DateTime.Now;
annot.Title = "NEW AUTHOR";
annot.Contents = "NEW CONTENTS";
annot.Color = Color.Red;
annot.Subject = "NEW SUBJECT";
annot.Open = true;
editor.ModifyAnnotations(1, 2, annot);
editor.Save("example_out.pdf");

另请参见