Load from a 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.Markdown 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-markdown -- dnx GroupDocs.Markdown.Mcp --yes
Folders, licensing and more →

GroupDocs.Markdown provides two ways to load a file from a local disk: the static one-liner API and the instance-based API.

Using static method

The simplest approach – pass a file path and get the Markdown string back:

import com.groupdocs.markdown.*;

public class LoadDiskStatic {

    public static void main(String[] args) {
        // Convert a local file to Markdown in one call
        String markdown = MarkdownConverter.toMarkdown("business-plan.docx");

        // Or save the result directly to a file
        MarkdownConverter.toFile("business-plan.docx", "load-disk-static.md");
    }
}

business-plan.docx is a sample file used in this example. Click here to download it.

![](data:...;base64,[elided])

**Meridian Outdoor Co. — Business Plan**

FY2026 Strategic Plan


# **Table of Contents**

FY2026 Strategic Plan	1
[TRUNCATED]

Download full output

Using instance API

When you need more control (e.g., conversion options, document info), create a MarkdownConverter instance:

import com.groupdocs.markdown.*;

public class LoadDiskInstance {

    public static void main(String[] args) {
        try (MarkdownConverter converter = new MarkdownConverter("business-plan.docx")) {
            // Retrieve document metadata
            DocumentInfo info = converter.getDocumentInfo();
            System.out.println("Format: " + info.getFileFormat() + ", Pages: " + info.getPageCount());

            // Convert to Markdown
            converter.convert("load-disk-instance.md");
        }
    }
}

business-plan.docx is a sample file used in this example. Click here to download it.

![](data:...;base64,[elided])

**Meridian Outdoor Co. — Business Plan**

FY2026 Strategic Plan


# **Table of Contents**

FY2026 Strategic Plan	1
[TRUNCATED]

Download full output