ModifyAnnotations

PdfAnnotationEditor.ModifyAnnotations method

Modifie les annotations du type spécifié sur la plage de pages spécifiée. Il prend en charge la modification des propriétés d’annotation suivantes : Modifié, Titre, Contenu, Couleur, Objet et Ouvrir.

public void ModifyAnnotations(int start, int end, Annotation annotation)
ParamètreTaperLa description
startInt32Le numéro de la page de démarrage.
endInt32Le numéro de la page de fin.
annotationAnnotationL’objet d’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 également