I have following docment: TestDocRotated0DegreesWirhoutRedaction.pdf (26.7 KB)
I use following Code to Redact a specific area like in the Code example:
using (var inputStream = new MemoryStream(content))
using (var document = new Document(inputStream))
Page page = document.Pages;
RedactionAnnotation annot = new RedactionAnnotation(page, new Rectangle(200,300,500,600))
FillColor = Color.Black,
Color = Color.Black,
BorderColor = Color.Black
The result document is: TestDocRotated0DegreesWITHRedaction.pdf (27.0 KB)
So far everything is working fine and correctly.
But if I Rotate the Page to 90 degrees like this document: TestDocRotated90DegreesWirhoutRedaction.pdf (26.8 KB)
And use the same code with the same coordinates for the rectangle the result is: TestDocRotated90DegreesWITHRedaction.pdf (27.4 KB)
But I thought that if I Add a annotation to a page and set the considerRotation variable to true like in the code: document.Pages.Annotations.Add(annot, true);
the position of the annotation will be recalculated according to the page rotation.
Another problem is that not only the postion is wrong you can also select the text under the annotation like in the document: TestDocRotated90DegreesWITHRedaction.pdf
I expect that the redactionAnnotation is right positioned and the text under the annotation is extracted/deleted so that nobody can select th text under the annotation.