Free Support Forum -

Redaction has a unexpected shadow

Hi support team,
I am facing with an issue about redaction. When I redact a pdf file was convert from an image of paragraph, has a shadow appear and I don’t want to see this. Can you help me to resolve this issue or give me a solution to fix that?expected result.png (23.9 KB)
current-result.png (78.7 KB)

I attach a capture file to help you know the issue I am facing


Thank you for contacting support.

We would like to request you to share a narrowed down sample application reproducing this issue, along with source and generated files so that we may try to reproduce and investigate it in our environment.

Hi @Farhan.Raza

Thank you for your response.
Here is the code that I am using:

using (var doc = new Aspose.Pdf.Document(“url”))
var annot = new RedactionAnnotation(doc.Pages[1], new Rectangle(67.909, 802.363, 67.909 + 53.955, 802.363 + 6.977))
FillColor = Color.Black,
BorderColor = Color.Black,
Color = Color.Black


And I also attach the source and generated file
GeneratedPDF.pdf (68.8 KB)
SourcePdf.pdf (152.6 KB)
Please take time to look at it and give me the response ASAP …


Thank you for sharing requested data.

We would like to share with you that the other black rectangle is created because of Redact method. It flattens the annotation and redacts page contents (i.e. removes text and image under redacted annotation). While removing text contents it places the black rectangle in place of it. If you want to avoid this rectangle, then you can call Flatten method instead of Redact method.

We hope this will clarify any ambiguity. Please feel free to contact us if you need any further assistance.