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

См. также