PNG JPG BMP TIFF PPTX
Aspose.Slides  for C++

Parse PPTX Presentations in C++

Use Aspose.Slides for C++ to extract text from presentation slides without Microsoft PowerPoint.

Parse PPTX File Using C++

Use Aspose.Slides for C++ to parse PPTX presentation files and extract text from slides. The API exposes slide text through SlideUtil::GetAllTextBoxes, ITextFrame, IParagraph, and IPortion, so you can read text content without automating Microsoft PowerPoint. Install the Aspose.Slides.Cpp package from NuGet or use the Package Manager Console command below.

Command

PM> Install-Package Aspose.Slides.Cpp

How to Parse PPTX Files in C++

Extract text from PPTX files with Aspose.Slides for C++.

  1. Load the PPTX file with the Presentation class.

  2. Get the ITextFrame objects from the first slide with SlideUtil::GetAllTextBoxes.

  3. Loop through the ITextFrame objects.

  4. Loop through the IParagraph objects in each ITextFrame.

  5. Loop through the IPortion objects in each IParagraph.

  6. Read the text with get_Text.

System Requirements

Aspose.Slides for C++ supports major desktop and server platforms. Make sure that your project has the following prerequisites.

  • Microsoft Windows or a compatible OS with C++ Runtime Environment for Windows 32 bit, Windows 64 bit and Linux 64 bit.
  • Aspose.Slides for C++ DLL referenced in your project.
 

Parse PPTX Files - C++

auto presentation = MakeObject<Presentation>(u"presentation.pptx");
auto textFrames = SlideUtil::GetAllTextBoxes(presentation->get_Slide(0));

for (auto&& textFrame : textFrames)
{
    for (auto&& paragraph : textFrame->get_Paragraphs())
    {
        for (auto&& portion : paragraph->get_Portions())
        {
            Console::WriteLine(portion->get_Text());
        }
    }
}

presentation->Dispose();
 
  • About Aspose.Slides for C++ API

    Aspose.Slides for C++ is a standalone API for creating, reading, parsing, editing, and converting presentation files. It can work with Microsoft PowerPoint and OpenDocument formats such as PPT, PPTX, and ODP without Microsoft PowerPoint or OpenOffice.

    Online PPTX Parser Live Demos

    PPTX What is PPTX File Format?

    A PPTX file is a Microsoft PowerPoint Open XML presentation file. It stores slides, text, images, formatting, animations, and other presentation content in a zipped XML-based package.

    Read More

    Other Supported Parsing Documents

    You can also parse other presentation formats with C++.

    ODP (OpenDocument Presentation Format)
    PPT (Microsoft PowerPoint 97-2003)