Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active December 3, 2021 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/d3fee2edd09e40fc8e40c8aee4beab65 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/d3fee2edd09e40fc8e40c8aee4beab65 to your computer and use it in GitHub Desktop.
Convert Word Document to Markdown in Java
// Load Word document from disk
Document doc = new Document("document.docx");
// Set Markdown options
MarkdownSaveOptions so = new MarkdownSaveOptions();
so.setImagesFolder("D:\\Images");
// Save the document in Markdown format
doc.save("word-to-markdown.md", so);
// Load Word document from disk
Document doc = new Document("document.docx");
// Save the document in Markdown format
doc.save("word-to-markdown.md");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment