# 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/nodejs-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.js" >}} ```js const redaction = require('@groupdocs/groupdocs.redaction'); const java = require('java'); const Color = java.import('java.awt.Color'); const Dimension = java.import('java.awt.Dimension'); const Point = java.import('java.awt.Point'); const redactor = new redaction.Redactor('Sample.pdf'); try { const rx = java.util.regex.Pattern.compile('urna'); const optionsText = new redaction.ReplacementOptions('[redarea]'); optionsText.setFilters(new redaction.RedactionFilter[] { new redaction.PageRangeFilter(redaction.PageSeekOrigin.End, 0, 1), // last page new redaction.PageAreaFilter(new Point(300, 0), new Dimension(300, 840)) // right half of the page }); const optionsImg = new redaction.RegionReplacementOptions(Color.RED, new Dimension(100, 100)); const result = redactor.apply(new redaction.PageAreaRedaction(rx, optionsText, optionsImg)); if (result.getStatus() !== redaction.RedactionStatus.Failed) { redactor.save(); } } 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/nodejs-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/nodejs-java/_output_files/developer-guide/advanced-usage/using-redaction-filters/use-page-area-redaction/CodeExampleUsePageAreaRedaction/Sample_redacted.pdf) {{< /tab >}} {{< /tabs >}}