> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/uwp/redaction/redact.md).

# Redact a PDF document in UWP

Learn how to redact content from a PDF document effectively with Apryse Redactor. Discover how Apryse SDK API can help review and remove metadata and other content, including XFA and XMP content. The

To redact content from a PDF document.

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
IList<RedactorRedaction> redactionList = new List<RedactorRedaction>();
redactionList.Add(new RedactorRedaction(1, new Rect(100, 100, 550, 600), false, "Top Secret"));
redactionList.Add(new RedactorRedaction(2, new Rect(30, 30, 450, 450), true, "Negative Redaction"));
redactionList.Add(new RedactorRedaction(2, new Rect(0, 0, 100, 100), false, "Positive"));
redactionList.Add(new RedactorRedaction(2, new Rect(100, 100, 200, 200), false, "Positive"));
redactionList.Add(new RedactorRedaction(2, new Rect(300, 300, 400, 400), false, ""));
redactionList.Add(new RedactorRedaction(2, new Rect(500, 500, 600, 600), false, ""));
redactionList.Add(new RedactorRedaction(3, new Rect(0, 0, 700, 20), false, ""));

RedactorAppearance redactionAppearance = new RedactorAppearance();
redactionAppearance.Overlay = true;
redactionAppearance.Border = false;
redactionAppearance.ShowRedactedContentRegions = true;

PDFDoc doc = new PDFDoc(Path.Combine(InputPath, "newsletter.pdf"));
Redactor.Redact(doc, redactionList, redactionAppearance, false, true);
```

{% endcode %}
{% endtab %}
{% endtabs %}

## About redactor

Apryse Redactor makes sure that if a portion of an image, text, or vector graphics is contained in a redaction region, that portion of the image or path data is destroyed and is not hidden with clipping or image masks. Apryse SDK API can also be used to review and remove metadata and other content that can exist in a PDF document, including XML Forms Architecture (XFA) content and Extensible Metadata Platform (XMP) content.

The redaction process in Apryse SDK consists of two steps:

**1. Content identification** A user applies redact annotations that specify the pieces or regions of content that should be removed. The content for redaction can be identified either interactively (e.g. using ‘pdftron.PDF.PDFViewCtrl’ as shown in PDFView sample) or programmatically (e.g. using ‘pdftron.PDF.TextSearch’ or ‘pdftron.PDF.TextExtractor’). Up until the next step is performed, the user can see, move and redefine these annotations.

**2. Content removal** Using ‘pdftron.PDF.Redactor.Redact()’ the user instructs Apryse SDK to apply the redact regions, after which the content in the area specified by the redact annotations is removed. The redaction function includes number of options to control the style of the redaction overlay (including color, text, font, border, transparency, etc.).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/uwp/redaction/redact.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
