ModifyAnnotations

PdfAnnotationEditor.ModifyAnnotations method

Modifierar anteckningarna av den angivna typen på det angivna sidintervallet. Det stöder att ändra nästa anteckningsegenskaper: Modifierad, Titel, Innehåll, Färg, Ämne och Öppna.

public void ModifyAnnotations(int start, int end, Annotation annotation)
ParameterTypBeskrivning
startInt32Startsidans nummer.
endInt32Slutsidans nummer.
annotationAnnotationAnteckningsobjektet innehåller nya egenskaper.

Exempel

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

Se även