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

Free Support Forum - aspose.com

Redaction of Vector Images in PDFs


In this PDF image_redaction_test.pdf (50.3 KB) we have a vector and raster image. If we use the Redaction feature we can redact both as shown in this PDF redacted.pdf (64.9 KB)

The issue is that if the user opens the redacted pdf in a PDF editor they can select the vector (but not the raster) image underneath the redaction and drag it out to see what it was, this defeats the purpose of the redaction.

Is there any way to handle this, maybe baking the vector image onto the page into a raster format?


PS: The code for doing the redaction is:

                    Rectangle redactionArea = new Rectangle(llx, lly, urx, ury);

                    var redaction = new Aspose.Pdf.Annotations.RedactionAnnotation(pageDoc.Pages[1], redactionArea);
                    if (!x.IsNegative) // redact in White rather than default black
                        redaction.FillColor = Color.White;
                        redaction.BorderColor = Color.White;
                        redaction.Color = Color.White;


Could you please share the values of llx, lly, urx and ury in above code snippet so that we can test the code snippet accordingly.

Hi, there are multiple as it’s just the values to create the 2 redactions you see on the second PDF so just set the values appropriately to cover the 2 images?


We were able to notice that image was being selected after adding redaction annotation. We tried to flatten PDF but it did not resolve the issue. Hence, we have logged it as PDFNET-46257 in our issue tracking system for further investigation and rectification. We will inform you as soon as we have further details in this regard. Please be patient and spare us little time.

We are sorry for the inconvenience.