تحليل تنسيقات PPTX في Java
تحليل مستندات PPTX الأصلي وعالي الأداء باستخدام Aspose من جانب الخادم. الشرائح لـ Java APIs ، دون استخدام أي برنامج مثل Microsoft أو Adobe PDF.
كيفية تحليل ملف PPTX باستخدام Java
من أجل تحليل ملف PPTX ، سنستخدمه
API وهي واجهة برمجة تطبيقات تحليل غنية بالميزات وقوية وسهلة الاستخدام لمنصة Java. يمكنك تنزيل أحدث إصدار مباشرة من
وقم بتثبيته ضمن مشروعك المستند إلى Maven عن طريق إضافة التكوينات التالية إلى ملف pom.xml.
مخزن
<repository>
<id>AsposeJavaAPI</id>
<name>Aspose Java API</name>
<url>https://releases.aspose.com/java/repo/</url>
</repository>
الاعتماد
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-slides</artifactId>
<version>version of aspose-slides API</version>
<classifier>jdk17</classifier>
</dependency>
خطوات تحليل ملفات PPTX في Java
يمكن إجراء تحليل مستند أساسي باستخدام واجهات برمجة تطبيقات Aspose.Slides for Java ببضعة سطور من التعليمات البرمجية.
قم بتحميل ملف PPTX عن طريق تثبيت فئة العرض التقديمي.
احصل على أول إطارات نصية للشرائح.
حلقة خلال كل جزء من فقرة.
احصل على المخرجات المطلوبة مثل النص والخط وما إلى ذلك.
متطلبات النظام
Aspose.Slides for Java يدعم جميع المنصات وأنظمة التشغيل الرئيسية. يرجى التأكد من توفر المتطلبات التالية.
- Microsoft Windows أو نظام تشغيل متوافق مع Java Runtime Environment لتطبيق JSP / JSF وتطبيقات سطح المكتب.
- احصل على أحدث إصدار من Aspose.Slides for Java مباشرة من مافن .
تحليل ملفات PPTX - جافا
//Load PPTX file
Presentation pptxPresentation = new Presentation("demo.pptx");
try{
//Get an Array of TextFrameEx objects from the first slide
ITextFrame[] textFramesSlideOne = SlideUtil.getAllTextBoxes(pptxPresentation.getSlides().get_Item(0));
//Loop through the Array of TextFrames
for (int i = 0; i < textFramesSlideOne.length; i++){
//Loop through paragraphs in current TextFrame
for (IParagraph para : textFramesSlideOne[0].getParagraphs()){
//Loop through portions in the current Paragraph
for (IPortion port : para.getPortions()){
//Display text in the current portion
System.out.print(port.getText());
//Display font height of the text
System.out.print(port.getPortionFormat().getFontHeight());
//Display font name of the text
System.out.print(port.getPortionFormat().getLatinFont().getFontName());
}
}
}
} finally {
if (pptxPresentation != null) pptxPresentation.dispose();
}
//Similarly extarcting text from the Whole Presentation
//Use getAllTextFrames(pptxPresentation, true) method and Iterate through Array
حول Aspose.Slides for Java API
يمكن استخدام Aspose.Slides API لقراءة وكتابة ومعالجة وتحويل مستندات Microsoft PowerPoint إلى PDF و XPS و HTML و TIFF و ODP وتنسيقات أخرى متنوعة. يمكن للمرء إنشاء ملفات جديدة من البداية وحفظ تلك في التنسيقات المدعومة ذات الصلة. Aspose.Slides هي واجهة برمجة تطبيقات مستقلة لإنشاء العروض التقديمية والشرائح والعناصر أو تحليلها أو معالجتها ، ولا تعتمد على أي برنامج مثل Microsoft أو OpenOffice.Online PPTX Parser Live Demos
Extract text and images from PPTX documents right now by visiting our Live Demos website . The live demo has the following benefits
PPTX ما هو PPTX تنسيق الملف
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.
قراءة المزيد