We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PdfAnnotationEditor RedactArea-Method is not working correctly

Dear support team,

I have several problems with redacting text with the Aspose.Pdf library (like PDFNET-45083, PDFNET-44620, PDFNET-45062).
So I wanted to use another method to delete text.

I found the PdfAnnotationEditor-Class thats given me a method named RedactArea().

If I use the following code to Redact any specific area the result on not rotated pages is correctly but the result on rotated pages for example 180 degree is not correct.

code snippet:
using (var inputStream = new MemoryStream(content))
using (var document = new Document(inputStream))
Page page = document.Pages[1];

                var annotEditor = new PdfAnnotationEditor(document);

                annotEditor.RedactArea(page.Number, new Rectangle(200, 300, 500, 600), System.Drawing.Color.Red);


I use following documents as testDocs:
Without rotation: TestDocumentPdfAnnotationEditor.pdf (30.4 KB)
With 180 degree rotation: TestDocument180DegreePdfAnnotationEditor.pdf (30.4 KB)

If you use the code with these two documents the result is following:
Result without rotation: TestDocumentResult0Degree.pdf (30.0 KB)
Result with 180 degree rotation: TestDocumentResult180Degree.pdf (30 KB)

As you can see the result without rotation is correctly.
The problem is that the result with rotation (for example with 180 degrees, it is also not working with 90 and 270 degrees) deletes the text on the right position but the position of the annotation with the color (red in this code snippet) is not correct.

This is not a simply issue and i hope the investigation and resolution of this bug will be faster than the other tickets (that are also not solved for weeks and months).
You will fined a similar Problem/Bug in your issue tracking system as PDFNET-45083.


We have worked with the data shared by you and have been able to reproduce the issue in our environment. A ticket with ID PDFNET-45140 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.