Convert PDF to XML in C++

Import PDF pages into slides and save the result as a PowerPoint XML Presentation.

Convert PDF to XML in C++

Aspose.Slides for C++ is a presentation processing API that can import PDF pages into slides and save the resulting presentation in PowerPoint XML Presentation format.

The generated XML represents the imported presentation; it is not a generic XML representation of the source PDF. Aspose.Slides for C++ can also export the imported content to PowerPoint, PDF, images, and other supported formats.

Convert PDF to XML Using C++

To convert PDF to PowerPoint XML, create a Presentation, remove the default slide, import the PDF pages, and save the presentation with SaveFormat::Xml.

C++ code for converting PDF into a PowerPoint XML Presentation

auto presentation = MakeObject<Presentation>();
presentation->get_Slides()->RemoveAt(0);
presentation->get_Slides()->AddFromPdf(u"input.pdf");

presentation->Save(u"document.xml", SaveFormat::Xml);
presentation->Dispose();

How to convert PDF to PowerPoint XML using Aspose.Slides for C++ API

These are the steps to import PDF pages and save them as a PowerPoint XML Presentation in C++.

  1. Install Aspose.Slides for C++ .

  2. Add a library reference to your C++ project.

  3. Remove the default slide and import the source PDF file into the Presentation object.

  4. Save the presentation with SaveFormat::Xml to create a PowerPoint XML Presentation file.

Convert PDF to Other Supported Formats

You can also convert PDF files and save them to other file formats. See all supported formats below.