Convert PPTX to EMF in C++

Convert PPTX to EMF using Aspose.Slides for C++ without Microsoft PowerPoint.

Convert PPTX to EMF Using C++

Aspose.Slides for C++ is a PowerPoint processing API that lets you convert PPTX presentations to EMF in C++ applications without Microsoft PowerPoint. Install the library from NuGet or download it from the Aspose.Slides for C++ releases page .

Command

PM> Install-Package Aspose.Slides.Cpp

PPTX to EMF C++ Conversion Source Code

auto presentation = MakeObject<Presentation>(u"presentation.pptx");
auto slide = presentation->get_Slide(0);
auto fileStream = File::Create(u"slide.emf");

slide->WriteAsEmf(fileStream);
fileStream->Dispose();

presentation->Dispose();

How to Convert PPTX to EMF via C++

Export a slide from a PPTX presentation to EMF with C++.

  1. Create a Presentation instance from the source PPTX file.
  2. Get the first slide from the presentation.
  3. Create a FileStream with File::Create.
  4. Call WriteAsEmf to export the slide.

System Requirements

Before running the C++ conversion example, make sure that the following prerequisites are available.

  • Microsoft Windows, Linux, or another compatible OS with the supported C++ runtime.
  • Aspose.Slides for C++ referenced in your project.

Built with Aspose.Slides

Convert PPTX to EMF Online

The free Aspose.Slides Conversion app is built with Aspose.Slides for C++, the same API as the code above. Open it and see what the API can do with your own PPTX files.

  • Runs in your browser, nothing to install.
  • See how Aspose.Slides converts files before you write code.
  • Upload PPTX files and save them as EMF.
  • Download the result or convert more files.