PdfAnnotationEditor.ModifyAnnotations

Méthode PdfAnnotationEditor.ModifyAnnotations

Modifie les annotations du type spécifié sur la plage de pages spécifiée. Elle permet de modifier les propriétés suivantes des annotations : Modifié, Titre, Contenu, Couleur, Sujet et Ouvert.

public void ModifyAnnotations(int start, int end, Annotation annotation)
ParamètreTypeDescription
startInt32Le numéro de la page de début.
endInt32Le numéro de la page de fin.
annotationAnnotationL’objet annotation contient de nouvelles propriétés.

Exemples

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

Voir aussi