# Use PageAreaRedaction Use PageAreaRedaction to redact text and images within a page range and page area. You can use **PageAreaRedaction** to redact an area of a specific page range from sensitive data in text, images, and annotations. Combine it with `PageRangeFilter` and `PageAreaFilter` on `ReplacementOptions`. This works for PDF and for other formats that support page filters (see [Supported document formats]({{< ref "redaction/java/getting-started/supported-document-formats.md" >}})). For embedded or standalone images, area coordinates follow the page (or visible) placement of the image. The following example demonstrates how to apply **PageAreaRedaction** to the right half of the last page in a PDF document. {{< tabs "code-example-use-page-area-redaction" >}} {{< tab "use_page_area_redaction.java" >}} ```java final Redactor redactor = new Redactor("Sample.pdf"); try { java.util.regex.Pattern rx = java.util.regex.Pattern.compile("urna"); ReplacementOptions optionsText = new ReplacementOptions("[redarea]"); optionsText.setFilters(new RedactionFilter[] { new PageRangeFilter(PageSeekOrigin.End, 0, 1), // last page new PageAreaFilter(new java.awt.Point(300, 0), new java.awt.Dimension(300, 840)) // right half of the page }); RegionReplacementOptions optionsImg = new RegionReplacementOptions(java.awt.Color.RED, new java.awt.Dimension(100, 100)); redactor.apply(new PageAreaRedaction(rx, optionsText, optionsImg)); SaveOptions saveOptions = new SaveOptions(); saveOptions.setAddSuffix(true); saveOptions.setRasterizeToPDF(false); saveOptions.setRedactedFileSuffix("redacted"); redactor.save(saveOptions); } finally { redactor.close(); } ``` {{< /tab >}} {{< tab "Sample.pdf" >}} {{< tab-text >}} `Sample.pdf` is the sample file used in this example. Click [here](https://docs.groupdocs.com/redaction/java/_sample_files/developer-guide/advanced-usage/using-redaction-filters/use-page-area-redaction/Sample.pdf) to download it. {{< /tab-text >}} {{< /tab >}} {{< tab "Sample_redacted.pdf" >}} ```text Binary file (PDF, 68 KB) ``` [Download full output](https://docs.groupdocs.com/redaction/java/_output_files/developer-guide/advanced-usage/using-redaction-filters/use-page-area-redaction/CodeExampleUsePageAreaRedaction/Sample_redacted.pdf) {{< /tab >}} {{< /tabs >}}