PdfDocumentFacade.ApplyRedactAnnotations(Func<PdfAnnotationFacade, Boolean>, PdfClearContentOptions) Method
Applies redaction annotations based on the specified criteria and allows you to choose which content remains visible.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Pdf.v25.1.Core.dll
NuGet Package: DevExpress.Pdf.Core
Declaration
public void ApplyRedactAnnotations(
Func<PdfAnnotationFacade, bool> predicate,
PdfClearContentOptions options = null
)
Parameters
Name | Type | Description |
---|---|---|
predicate | Func<PdfAnnotationFacade, Boolean> | Defines a set of criteria for the PdfAnnotationFacade object. |
Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
options | PdfClearContentOptions | null | Options that specify what content type to keep in target regions. |
Remarks
Example: Apply Redaction Annotations on Lower Half of the Page
using DevExpress.Pdf;
PdfDocumentProcessor pdfProcessor = new PdfDocumentProcessor();
pdfProcessor.LoadDocument("Invoice.pdf");
PdfDocumentFacade documentFacade = pdfProcessor.DocumentFacade;
double halfPage = pdfProcessor.Document.Pages[0].CropBox.Top / 2;
documentFacade.ApplyRedactAnnotations(x => x.Rectangle.Top < halfPage);
pdfProcessor.SaveDocument("output.pdf");
See Also