Aspose.Total for C++ file format automation libraries allows C++ developer to convert MD to DOT in two simple steps. Firstly, you can use Aspose.PDF for C++ API to convert MD file format to DOC. Secondly, by using advanced Word Document Processing API Aspose.Words for C++ , you can export DOC to DOT.
C++ API to Render MD to DOT
Get Started with C++ File Automation APIs
Install from command line as
nuget install Aspose.Total.Cpp or via Package Manager Console of Visual Studio with
Alternatively, get the offline MSI installer or DLLs in a ZIP file from downloads .
// load MD file with an instance of Document class reference auto doc = MakeObject<Document>(u"sourceFile.md"); // save MD as a DOC doc->Save(u"DocOutput.doc", SaveFormat::Doc); // load DOC with an instance of Document System::SharedPtr<Document> wordDoc = System::MakeObject<Document>(u"DocOutput.doc"); // save document as Dot wordDoc->Save(u"output.Dot");
Change Password of MD Document via C++
In the process of rendering MD to DOT, you can open a password protected MD and also change its password. In order to change the password of a MD file, you must know the owner password of that document. You can load password protected PDF document with Aspose.PDF for C++ by specifying its owner password and use ChangePasswords method to change the password.
// load an existing MD Document auto doc = MakeObject<Document>(L"input.md", L"owner"); // change password of MD Document doc->ChangePasswords(L"owner", L"newuser", L"newuser"); // save the document doc->Save(L"output.Doc");
Restrict DOT File Editing via C++
You can also restrict DOT file editing using using Aspose.Words for C++ API. Sometimes you may need to limit the ability to edit a document and only allow certain actions with it. API enables you to control the way you restrict the content using the ProtectionType enumeration parameter. The following code example demonstrates how to restrict editing in a document so only editing in form fields is possible.
// load Doc with an instance of Document auto doc = System::MakeObject<Document>("input.doc"); // document protection only works when document protection is turned and only editing in form fields is allowed. doc->Protect(ProtectionType::AllowOnlyFormFields, u"password"); // save the protected document. doc->Save(u"Protected.Dot");
Other Conversion Options
MD What is MD File Format?
Text files created with Markdown language dialects is saved with .md or .MARKDOWN file extension. MD files are saved in plain text format that uses Markdown language which also includes inline text symbols, defining how a text can be formatted such as indentations, table formatting, fonts, and headers. MD files can be converted to HTML with a program called Markdown. Markdown language is released by John Gruber.Read More
DOT What is DOT File Format?
Files with .DOT extension are template files created by Microsoft Word to have pre-formatted settings for generation of further DOC or DOCX files. A template file is created in order to have specific user settings that should be applied to subsequent files created from these. These settings include page margins, borders, headers, footers, and other page settings. Such templates are used in official documents such as company letterheads and standardized forms. The DOT file format is specific to Microsoft Word 2003 and earlier, but is supported by higher versions as well. Microsoft Word by default opens every new document based on normal.dot file. If modified, all the new files created will result in same settings as from the template file. In Microsoft Word 2007, the DOT file format has been replaced with Office OpenXML based DOTX file format.Read More