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

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

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



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

 من أجل تحليل ملف PPTX ، سنستخدمه
 [Aspose.Slides for C ++](https://products.aspose.com/slides/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

```

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

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

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

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

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

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

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

اعرض النص.

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

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

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

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

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

// Load the PPTX 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.

Files with PPTX extension are presentation files created with popular Microsoft PowerPoint application. Unlike the previous version of presentation file format PPT which was binary, the PPTX format is based on the Microsoft PowerPoint open XML presentation file format. 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](https://products.aspose.com/slides/cpp/parser/odp/) — تنسيق العرض التقديمي OpenDocument
- [PPT](https://products.aspose.com/slides/cpp/parser/ppt/) — مايكروسوفت باور بوينت 97-2003
