# استخراج النص والصور من مستند PPT عبر C ++

> مثال على كود C ++ لاستخراج النص والصور من ملف PPT في C ++ Runtime Environment لنظام التشغيل Windows 32 بت و Windows 64 بت و Linux 64 بت.

Source: https://products.aspose.com/slides/ar/cpp/parser/ppt/
Updated: 2026-08-11



## كيفية تحليل ملف PPT باستخدام C ++

 من أجل تحليل ملف PPT ، سنستخدمه
 [Aspose.Slides for C ++](https://products.aspose.com/slides/ar/cpp/)
 API وهي غنية بالميزات وقوية وسهلة الاستخدام لتحليل المستندات API لمنصة C ++. يمكنك تنزيل أحدث إصدار مباشرة ، فقط افتح
 [NuGet](https://www.nuget.org/packages/aspose.slides)
 مدير الحزم ، ابحث عن
 ** Aspose.Slides.Cpp **
 وتثبيت. يمكنك أيضًا استخدام الأمر التالي من Package Manager Console.

### أمر

```cs

PM> Install-Package Aspose.Slides.Cpp

```

## خطوات تحليل ملفات PPT في C ++

تحليل مستند أساسي باستخدام [Aspose.Slides for C ++](https://products.aspose.com/slides/ar/cpp/) يمكن إجراء واجهات برمجة التطبيقات باستخدام بضعة أسطر من التعليمات البرمجية.

قم بتحميل ملف PPT.

احصل على صفيف من كائنات ITextFrame للشريحة الأولى.

حلقة خلال صفيف إطارات النص

تكرار الفقرات في ITextFrame الحالي.

تكرار خلال الأجزاء الموجودة في فقرة IP الحالية.

اعرض النص.

## متطلبات النظام

 Aspose.Slides for C ++ يدعم جميع المنصات وأنظمة التشغيل الرئيسية. يرجى التأكد من توفر المتطلبات التالية.

- Microsoft Windows أو نظام تشغيل متوافق مع C ++ Runtime Environment لأنظمة Windows 32 بت و Windows 64 بت و Linux 64 بت.
- Aspose.Slides لـ C ++ DLL المشار إليها في مشروعك.

### تحليل ملفات PPT - C ++

```cs
// Sample file path
const String sourceFilePath = u"SourcePath\sourceFile.ppt";

// Load the PPT 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());
		}
	}
}

```

## حول Aspose.Slides for C ++ API

 يمكن استخدام Aspose.Slides API لقراءة وكتابة ومعالجة وتحويل مستندات Microsoft PowerPoint إلى PDF و XPS و HTML و TIFF و ODP وتنسيقات أخرى متنوعة. يمكن للمرء إنشاء ملفات جديدة من البداية وحفظ تلك في التنسيقات المدعومة ذات الصلة. Aspose.Slides هي واجهة برمجة تطبيقات مستقلة لإنشاء العروض التقديمية والشرائح والعناصر أو تحليلها أو معالجتها ، ولا تعتمد على أي برنامج مثل Microsoft أو OpenOffice.

A file with PPT extension represents PowerPoint file that consists of a collection of slides for displaying as SlideShow. It specifies the Binary File Format used by Microsoft PowerPoint 97-2003. A PPT file can contain several different types of information such as text, bulleted points, images, multimedia and other embedded OLE objects. Microsoft came up with newer file format for PowerPoint, known as PPTX, from 2007 onwards that is based on Office OpenXML and is different from this binary file format. Several other application programs such as OpenOffice Impress and Apple Keynote can also create PPT files.

## مستندات التحليل المعتمدة الأخرى

- [ODP](https://products.aspose.com/slides/ar/cpp/parser/odp/) — تنسيق العرض التقديمي OpenDocument
- [PPTX](https://products.aspose.com/slides/ar/cpp/parser/pptx/) — افتح تنسيق عرض XML
