Are you a C++ developer looking to add to integrate MD to POWERPOINT conversion feature inside your C++ applications? You can do it in two simple steps. You can export MD to PPTX by using Aspose.PDF for C++ . Secondly, by using Aspose.Slides for C++ , you can convert PPTX to POWERPOINT. Both APIs come under Aspose.Total for C++ package.
C++ API to Export MD to POWERPOINT
- Open MD file using Document class reference
- Convert MD to PPTX by using Save method function
- Load PPTX document by using Presentation class reference
- Save the document to PPT format using
member function and set
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 auto doc = MakeObject<Document>(u"template.md"); // save MD as PPTX format doc->Save(u"PptxOutput.pptx", SaveFormat::Pptx); // instantiate a Presentation object that represents a PPTX file SharedPtr<Presentation> prs = MakeObject<Presentation>(u"PptxOutput.pptx"); // save the presentation as Ppt format prs->Save(u"output.ppt", Aspose::Slides::Export::SaveFormat::Ppt);
Change Password of MD Document via C++
In the process of rendering MD to POWERPOINT, 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");
Add Images From Web in POWERPOINT File via C++
After converting MD to POWERPOINT, you can also add images from web to your output document. Aspose.Slides for C++ supports operations with images in these popular formats: JPEG, PNG, BMP, GIF, and others. You can add one or several images on your computer onto a slide in a presentation. This sample code in C++ shows you how to add an image to a POWERPOINT file
// instantiate a Presentation object that represents a POWERPOINT file auto pres = System::MakeObject<Presentation>("output.powerpoint"); // get slide auto slide = pres->get_Slides()->idx_get(0); // initialize Web Client auto webClient = System::MakeObject<WebClient>(); // get image data auto imageData = webClient->DownloadData(System::MakeObject<Uri>(u"[REPLACE WITH URL]")); // add image auto image = pres->get_Images()->AddImage(imageData); // add picture frame slide->get_Shapes()->AddPictureFrame(ShapeType::Rectangle, 10.0f, 10.0f, 100.0f, 100.0f, image); // save updated file pres->Save(u"updated.powerpoint", SaveFormat::Ppt);
Explore MD Conversion Options with C++
What is MD File Format?
MD, or Markdown, is a lightweight markup language commonly used for formatting plain text documents. It was created by John Gruber in 2004 with the goal of allowing writers to focus on content without the distractions of complex formatting. Markdown uses simple and intuitive syntax that can be easily converted into HTML or other document formats.
In Markdown, you can apply formatting to text by using a combination of special characters and plain text. For example, you can use asterisks or underscores to create italic or bold text, hashtags to create headings, and hyphens or asterisks to create lists. Markdown also supports adding links, images, code snippets, and tables.
One of the advantages of Markdown is its readability in its raw form, as it closely resembles plain text. It can be written in any text editor and easily converted into HTML or other formats using various tools and converters. Markdown files have the .md or .markdown file extension.
Markdown is widely used for writing documentation, creating blog posts, and even in version control systems like Git. Its simplicity and versatility have made it a popular choice among writers, developers, and content creators for creating structured and well-formatted documents with minimal effort.
What is POWERPOINT File Format?
PowerPoint file formats encompass the various types of files utilized to store and exchange presentations created in Microsoft PowerPoint software. These formats are tailored to accommodate the diverse functionalities and features of PowerPoint. The primary file formats for PowerPoint are .pptx and .ppt. Introduced with PowerPoint 2007, .pptx stands as the newer file format and has become the default choice since then. It employs an open XML format, enabling smaller file sizes, enhanced data recovery, and seamless integration with other Microsoft Office applications. Moreover, .pptx files can incorporate embedded media and 3D graphics.
The older file format, .ppt, was used by PowerPoint versions predating 2007. Although newer versions of PowerPoint continue to support .ppt files, they possess limitations compared to .pptx. .ppt files tend to have larger file sizes and lack support for several advanced features available in .pptx.
PowerPoint also offers the .ppsx and .ppsm file formats, primarily utilized for presentations saved as slide shows. The .ppsx format serves static presentations, while the .ppsm format supports macros and animations.
Beyond these formats, PowerPoint extends support to other file formats such as .pdf, .odp, and .potx. These formats cater to specific needs, such as sharing presentations with non-PowerPoint users or creating presentation templates.