Load from local disk

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.Watermark 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-watermark -- dnx GroupDocs.Watermark.Mcp --yes
Folders, licensing and more →

On this page

The folowing example demontrates how to create a watermarker for a local filesystem document:

advanced_usage.loading_documents.LoadFromLocalDisk

// Specify an absolute or relative path to your document. Ex: "C:\\Docs\\document.docx"
String filePath = "document.docx";                                                                 
Watermarker watermarker = new Watermarker(filePath);                                                        
// use watermarker methods to manage watermarks                                                             
TextWatermark watermark = new TextWatermark("Test watermark", new Font("Arial", 12));                       
                                                                                                            
watermarker.add(watermark);                                                                                 
watermarker.save("document.docx");                                                                
watermarker.close();                                                                                      

On this page