PdfAnnotationEditor.ModifyAnnotations

PdfAnnotationEditor.ModifyAnnotations method

Modifies the annotations of the specifed type on the specified page range. It supports to modify next annotation properties: Modified, Title, Contents, Color, Subject and Open.

public void ModifyAnnotations(int start, int end, Annotation annotation)
ParameterTypeDescription
startInt32The start page number.
endInt32The end page number.
annotationAnnotationThe annotation object contains new properties.

Examples

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

See Also