Load from a local disk

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

Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.