Load from local disc

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Redaction MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-redaction -- dnx GroupDocs.Redaction.Mcp --yes
Folders, licensing and more →

Load from local disc

GroupDocs.Redaction.Redactor class is a main class in Redaction API, providing functionality to open a document. When document is located on the local disk, you can pass its path to *Redactor *class constructor.

The following example demonstrates how to open a document from local disc:

final Redactor redactor = new Redactor("sample.docx");
try 
{
    // Here we can use document instance to perform redactions   
    redactor.apply(new DeleteAnnotationRedaction());
    redactor.save();
}
finally { redactor.close(); }

sample.docx is the sample file used in this example. Click here to download it.

Binary file (PDF, 1.2 MB)

Download full output