PdfRedactAnnotationFacade.Apply(PdfClearContentOptions) Method
Applies the redaction annotation. Allows you to specify what content type to keep visible in the redaction area.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Pdf.v25.1.Core.dll
NuGet Package: DevExpress.Pdf.Core
Declaration
Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
options | PdfClearContentOptions | null | Options that specify what content type to keep visible in the redaction area. |
Example
The following code snippet applies redaction annotations made by a specific author:
using DevExpress.Pdf;
using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
{
processor.LoadDocument("output_to_review.pdf");
PdfDocumentFacade documentFacade = processor.DocumentFacade;
foreach (var page in documentFacade.Pages)
{
var redactionAnnotations = page.Annotations.Where(annotation => annotation.Type == PdfAnnotationType.Redaction).ToList();
foreach (PdfRedactAnnotationFacade annotation in redactionAnnotations)
{
if (annotation.Author == "Jane Doe")
annotation.Apply();
}
}
processor.SaveDocument("output_applied.pdf");
}
See Also