I have a PDF written in Arabic and I want to apply text redaction to it, but it is not being redacted.
here is the code I am using;
public static async Task RedactDocumentAsync(string inputFilePath)
{
try
{
//set redaction policy
RedactionPolicy redactionPolicy = new RedactionPolicy(new GroupDocs.Redaction.Redaction[]
{
new ExactPhraseRedaction("دراسة", new ReplacementOptions(Color.Black))
});
Redactor redactor = new Redactor(inputFilePath);
//applying redaction policy
RedactorChangeLog result = redactor.Apply(redactionPolicy);
//saving the document after successful redaction
if (result.Status != RedactionStatus.Failed)
{
redactor.Save();
}
}
catch (Exception)
{
throw;
}
}
I have attached the document that I am trying to redact and the resultant document after redaction.
abc.pdf (35.7 KB)
abc_Redacted.pdf (571.3 KB)