<repositories>
<repository>
<id>repository.groupdocs.com</id>
<name>GroupDocs Repository</name>
<url>https://releases.groupdocs.com/java/repo/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-markdown</artifactId>
<version>25.12</version>
</dependency>
</dependencies>repositories {
maven {
url 'https://releases.groupdocs.com/java/repo/'
}
}
compile(group: 'com.groupdocs', name: 'groupdocs-markdown', version: '25.12')<ivysettings>
<settings defaultResolver="chain"/>
<resolvers>
<chain name="chain">
<ibiblio name="GroupDocs Repository" m2compatible="true" root="https://releases.groupdocs.com/java/repo/"/>
</chain>
</resolvers>
</ivysettings>
<dependency org="com.groupdocs" name="groupdocs-markdown" rev="25.12">
<artifact name="groupdocs-markdown" ext="jar"/>
</dependency>resolvers += Resolver.url("GroupDocs Repository", url("https://releases.groupdocs.com/java/repo/"))
libraryDependencies += "com.groupdocs" % "groupdocs-markdown" % "25.12"GroupDocs.Markdown for Java Downloads
Powerful document processing API for Java to export PDF, Word, Excel, and other formats to Markdown for seamless integration with the generative AI ecosystem. Accurately export headings, paragraphs, lists, tables, links, images, blockquotes, and code blocks with flexible image handling options.
Quick links
Key Features
- Export multiple document formats: Convert popular file types (PDF, DOCX, XLSX, EPUB, and more) to Markdown.
- Advanced Markdown formatting: Accurately export headings, paragraphs, lists, tables, links, images, blockquotes, and code blocks.
- Flexible image handling: Export images separately or embed them directly into the Markdown file.
- Local processing: No cloud or internet connection required. All processing happens securely on your machine.
Supported Formats
- Portable Document Format: PDF
Spreadsheets
- Microsoft Excel: XLS, XLSX, XLSB, XLSM, XLT, XLTX, XLTM, XLAM
- OpenDocument Spreadsheet: ODS, OTS, FODS
- Other: CSV, TSV, NUMBERS, SXC
Word / Rich Text
- Microsoft Word: DOC, DOCX, DOT, DOTM, DOTX, DOCM, RTF
- OpenDocument Text: ODT, OTT
Ebooks
- eBook: AZW3, MOBI, EPUB
Text / Markup / Help
- Other: CHM, XML, TXT
See the full list of supported formats.
Getting Started
Prerequisites
- Java Runtime Environment (JRE) 8 or later
- Windows or Linux
Installation
To install the package, check the System Requirements and Installation documentation topics for platform-specific instructions.
Use cases
Here are some typical use cases:
Convert document to Markdown
This example shows how to convert a DOCX file to Markdown format.
import com.groupdocs.markdown.*;
public class Main {
public static void main(String[] args) {
// Set the license (optional)
License.setLicense("GroupDocs.Markdown.lic");
// Instantiate the converter
MarkdownConverter converter = new MarkdownConverter("sample.docx");
// Convert and save output to file with embedded images
converter.convertToFile("result.md");
}
}
The output result.md file contains the converted Markdown content with images embedded by default.
Convert with custom image handling
import com.groupdocs.markdown.*;
public class Main {
public static void main(String[] args) {
// Set the license (optional)
License.setLicense("GroupDocs.Markdown.lic");
// Instantiate converter
MarkdownConverter converter = new MarkdownConverter("sample.docx");
// Set the image export strategy
DocumentConverterOptions converterOptions = new DocumentConverterOptions();
converterOptions.setImageExportStrategy(new ExportImagesToFileSystemStrategy("images"));
// Convert and save output to file with images saved to `images` folder
converter.convertToFile("reslt.md", converterOptions);
}
}
This code example converts a DOCX file to Markdown and exports images separately instead of embedding them.
Convert multiple documents
This code example shows how to convert multiple documents to Markdown format.
import com.groupdocs.markdown.*;
import java.nio.file.Files;
import java.nio.file.Paths;
public class Main {
public static void main(String[] args) {
// Set the license (optional)
License.setLicense("GroupDocs.Markdown.lic");
// List of documents to convert
String[] documents = {"sample.pdf", "sample.docx", "sample.xlsx"};
for (String document : documents) {
try (MarkdownConverter converter = new MarkdownConverter(document)) {
DocumentConverterResult result = converter.convert();
if (result.isSuccess()) {
// Save the converted Markdown content to file
String outputFile = document + ".md";
Files.write(Paths.get(outputFile), result.getContent().getBytes());
System.out.println("Converted: " + document + " -> " + outputFile);
} else {
// Handle the conversion error
System.err.println("Conversion failed for " + document + ": " + result.getErrorMessage());
if (result.getException() != null) {
result.getException().printStackTrace();
}
}
}
}
}
}
This example converts multiple documents (PDF, DOCX, XLSX) to Markdown format, creating separate output files for each.
| Version | Release Date |
|---|---|
| 25.12 | December 25, 2025 |
