ModifyAnnotations

PdfAnnotationEditor.ModifyAnnotations method

Изменяет аннотации указанного типа в указанном диапазоне страниц. Поддерживает изменение следующих свойств аннотаций: Изменено, Заголовок, Содержание, Цвет, Тема и Открыть.

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

Смотрите также