# Convert PDF to XML in C++

> Import PDF pages into slides and save the result as a PowerPoint XML Presentation in C++ using Aspose.Slides for C++.

Source: https://products.aspose.com/slides/cpp/conversion/pdf-to-xml/
Updated: 2026-07-31



## Convert PDF to XML in C++

[**Aspose.Slides for C++**](/slides/cpp/) 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

```cpp
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++.

Install [**Aspose.Slides for C++**](/slides/cpp/).

Add a library reference to your C++ project.

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

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

## Convert PDF to Other Supported Formats

- [PDF TO HTML](/slides/cpp/conversion/pdf-to-html/)
- [PDF TO IMAGE](/slides/cpp/conversion/pdf-to-image/)
- [PDF TO JPG](/slides/cpp/conversion/pdf-to-jpg/)
- [PDF TO PNG](/slides/cpp/conversion/pdf-to-png/)
- [PDF TO TIFF](/slides/cpp/conversion/pdf-to-tiff/)
- [PDF TO SVG](/slides/cpp/conversion/pdf-to-svg/)
- [PDF TO PPTX](/slides/cpp/conversion/pdf-to-pptx/)
- [PDF TO PPT](/slides/cpp/conversion/pdf-to-ppt/)
