ModifyAnnotations

PdfAnnotationEditor.ModifyAnnotations method

在指定页面范围内修改指定类型的注解。 支持修改下一个注解属性:Modified、Title、Contents、Color、Subject和Open。

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");

也可以看看