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

Parse ODP Formats in C++

Native and high performance ODP document parsing using server-side Aspose.Slides for C++ APIs, without the use of any software like Microsoft or Adobe PDF.

Parse ODP File Using C++

In order to parse ODP file, we’ll use

Aspose.Slides for C++

API which is a feature-rich, powerful and easy to use document parsing API for C++ platform. You can download its latest version directly, just open

NuGet

package manager, search for Aspose.Slides.Cpp and install. You may also use the following command from the Package Manager Console.

Command


PM> Install-Package Aspose.Slides.Cpp

How to Parse ODP Files in C++

A basic document parsing with Aspose.Slides for C++ APIs can be done with just few lines of code.

  1. Load ODP file.

  2. Get an Array of ITextFrame objects of first slide.

  3. Loop through the Array of TextFrames

  4. Loop through paragraphs in current ITextFrame.

  5. Loop through portions in the current IParagraph.

  6. Display the text.

System Requirements

Aspose.Slides for C++ supports on all major platforms and Operating Systems. Please make sure that you have 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++

// Sample file path
const String sourceFilePath = u"SourcePath\sourceFile.odp";

// Load the ODP file
SharedPtr<Presentation> presentation = MakeObject<Presentation>(sourceFilePath);

// Get an Array of ITextFrame objects from the first slide
System::ArrayPtr<SharedPtr<ITextFrame>> textFramesSlideOne = SlideUtil::GetAllTextBoxes(presentation->get_Slides()->idx_get(0));

// Loop through the Array of TextFrames
for (int i = 0; i get_Length(); i++){
	// Loop through paragraphs in current ITextFrame
	for (SharedPtr<IParagraph> paragraph : textFramesSlideOne[i]->get_Paragraphs()){
		// Loop through portions in the current IParagraph
		for (SharedPtr<IPortion> portion : paragraph->get_Portions()){
			// Display text
			Console::WriteLine(portion->get_Text());
		}
	}
}  

    
 
  • About Aspose.Slides for C++ API

    Aspose.Slides API can be used to read, write, manipulate and convert Microsoft PowerPoint documents to PDF, XPS, HTML, TIFF, ODP and various other formats. One can create new files from scratch and save those in the relevant supported formats. Aspose.Slides is a standalone API for creating, parsing or manipulating presentations, slides and elements and it does not depend on any software like Microsoft or OpenOffice.

    Online ODP Parser Live Demos

    ODP What is ODP File Format?

    Files with ODP extension represent presentation file format used by OpenOffice.org in the OASISOpen standard. A presentation file is a collection of slides where each slide can comprise of text, images, formatting, animations, and other media. These slides are presented to audience in the form of slideshows with custom presentation settings. ODP files can be opened by applications that conform to the OpenDocument format (such as OpenOffice or StarOffice).

    Read More

    Other Supported Parsing Documents

    Using C++, one can easily parse other formats including.

    PPT (Microsoft PowerPoint 97-2003)
    PPTX (Open XML presentation Format)