Hi Team
Hi Bala,
Hi Team
Hi Balamurugan,
Thanks for sharing the details.
I am afraid currently Aspose.Pdf for .NET does not support the feature to delete graph objects from a particular area inside a PDF document. However, you may consider redacting a particular page region.
The RedactArea method is added in PdfAnnotationEditor. This method allows you to redact an area of the document, i.e., remove all contents in the specified rectangle.
PdfAnnotationEditor editor = new PdfAnnotationEditor();
editor.RedactArea(1,
new Aspose.Pdf.Rectangle(100, 100, 20, 70),
System.Drawing.Color.White);
editor.BindPdf("source.pdf");
editor.Save("result.pdf");
We also added a class named RedactionAnnotation which can be used to operate with existing redaction annotations and redact them (i.e., flatten annotation and remove text under it).
Document doc = new Document("source.pdf");
RedactionAnnotation annot = new Aspose.Pdf.InteractiveFeatures.Annotations.RedactionAnnotation(
doc.Pages[1],
new Aspose.Pdf.Rectangle(200, 500, 300, 600));
annot.FillColor = Aspose.Pdf.Color.Green;
annot.BorderColor = Aspose.Pdf.Color.Yellow;
annot.Color = Aspose.Pdf.Color.Blue;
annot.OverlayText = "REDACTED";
annot.TextAlignment = Aspose.Pdf.HorizontalAlignment.Center;
annot.Repeat = true;
doc.Pages[1].Annotations.Add(annot);
doc.Save("result.pdf");
RedactionAnnotation has a method named Redact(). When this method is called, the redaction annotation is flattened and the text under the annotation is redacted.