Parse ODP Presentations in C++
Use Aspose.Slides for C++ to extract text from presentation slides without Microsoft PowerPoint.
Parse ODP File Using C++
Use Aspose.Slides for C++ to parse ODP 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 ODP Files in C++
Extract text from ODP files with Aspose.Slides for C++.
Load the ODP file with the
Presentationclass.Get the
ITextFrameobjects from the first slide withSlideUtil::GetAllTextBoxes.Loop through the
ITextFrameobjects.Loop through the
IParagraphobjects in eachITextFrame.Loop through the
IPortionobjects in eachIParagraph.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 ODP Files - C++
auto presentation = MakeObject<Presentation>(u"presentation.odp");
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 asPPT, PPTX, and ODP without Microsoft PowerPoint or OpenOffice.Online ODP Parser Live Demos
ODP What is ODP File Format?
An ODP file is an OpenDocument presentation file used by applications such as OpenOffice Impress and LibreOffice Impress. It stores slides, text, images, formatting, animations, and other presentation content in an open XML-based package.
Read More