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);
annotEditor.Save(@"C:\temp\RedactedDoc.pdf");
}
}
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.