Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active October 22, 2024 07:21
MD Files Conversion and Manipulation using Java

MD Files Manipulation and Conversion using Aspose.Total for Java

Powerful Java File Format Automation APIs to convert MD format to docm, dot, dotm, dotx, flatopc, gif, markdown, mhtml, odp, odt, otp, ott, pcl, pot, potm, potx, powerpoint, pps, ppsm, ppsx, ppt, pptm, ps, rtf, swf, wordml, xaml, xamlflow Formats.

The below Java code example demonstrates how to convert MD Documents. More details at https://products.aspose.com/total/java/conversion/md-to-docm/

Installation

One can easily use Aspose.Total for Java directly from a Maven based project and include libraries in your pom.xml.

Alternatively, you can get a ZIP file from downloads.

More About Java Total API

Home | Product Page | Docs | Demos | Examples | Blog | Search | Free Support | Temporary License

Document document = new Document("template.md");
document.save("DocOutput.doc", SaveFormat.DOC);
Document outputDocument = new com.aspose.words.Document("DocOutput.doc");
//dot, dotm, dotx, rtf ...
outputDocument.save("output.docm", SaveFormat.DOCM);
Document document = new Document("template.md");
document.save("DocOutput.doc", SaveFormat.DOC);
Document outputDocument = new com.aspose.words.Document("DocOutput.doc");
// call save method while passing SaveFormat.GIF
outputDocument.save("output.gif", SaveFormat.GIF);
Document document = new Document("template.md");
// save MD as a DOC
document.save("DocOutput.doc", SaveFormat.DOC);
// load DOC with an instance of Document
Document outputDocument = new com.aspose.words.Document("DocOutput.doc");
// call save method while passing SaveFormat.MHTML
outputDocument.save("output.mhtml", SaveFormat.MHTML);
Document document = new Document("template.md");
// save MD as a DOC
document.save("DocOutput.doc", SaveFormat.DOC);
// load DOC with an instance of Document
Document outputDocument = new com.aspose.words.Document("DocOutput.doc");
// call save method while passing SaveFormat.ODT
outputDocument.save("output.odt", SaveFormat.ODT);
Document document = new Document("template.md");
// save MD as a DOC
document.save("DocOutput.doc", SaveFormat.DOC);
// load DOC with an instance of Document
Document outputDocument = new com.aspose.words.Document("DocOutput.doc");
// call save method while passing SaveFormat.OTT
outputDocument.save("output.ott", SaveFormat.OTT);
Document document = new Document("template.md");
document.save("DocOutput.doc", SaveFormat.DOC);
Document outputDocument = new com.aspose.words.Document("DocOutput.doc");
// call save method while passing SaveFormat.PCL
outputDocument.save("output.pcl", SaveFormat.PCL);
Document document = new Document("template.md");
// save MD as PPTX format
document.save("PptxOutput.pptx", SaveFormat.Pptx);
// instantiate a Presentation object that represents a PPTX file
Presentation presentation = new Presentation("PptxOutput.pptx");
// save the presentation as Ppt format
presentation.save("output.ppt", SaveFormat.Ppt);
Document document = new Document("template.md");
// save MD as a DOC
document.save("DocOutput.doc", SaveFormat.DOC);
// load DOC with an instance of Document
Document outputDocument = new com.aspose.words.Document("DocOutput.doc");
// call save method while passing SaveFormat.WORD_ML
outputDocument.save("output.word_ml", SaveFormat.WORD_ML);
Document document = new Document("template.md");
// save MD as PPTX format
document.save("PptxOutput.pptx", SaveFormat.Pptx);
// instantiate a Presentation object that represents a PPTX file
Presentation presentation = new Presentation("PptxOutput.pptx");
// save the presentation as Xaml format
presentation.save("output.xaml", SaveFormat.Xaml);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment