Examine Presentation
Aspose.Slides for PHP via Java allows you to examine a presentation to find out its properties and understand its behavior.
Info
The PresentationInfo and DocumentProperties classes contain the properties and methods used in operations here.Check a Presentation Format
Before working on a presentation, you may want to find out what format (PPT, PPTX, ODP, and others) the presentation is in at the moment.
You can check a presentation’s format without loading the presentation. See this PHP code:
$info = PresentationFactory->getInstance()->getPresentationInfo("pres.pptx");
echo($info->getLoadFormat());// PPTX
$info2 = PresentationFactory->getInstance()->getPresentationInfo("pres.ppt");
echo($info2->getLoadFormat());// PPT
$info3 = PresentationFactory->getInstance()->getPresentationInfo("pres.odp");
echo($info3->getLoadFormat());// ODP
Get a Presentation Properties
This PHP code shows you how to get a presentation’s properties (information about the presentation):
$info = PresentationFactory->getInstance()->getPresentationInfo("pres.pptx");
$props = $info->readDocumentProperties();
echo($props->getCreatedTime());
echo($props->getSubject());
echo($props->getTitle());
# ..
You may want to see the properties under the DocumentProperties class.
Update a Presentation Properties
Aspose.Slides provides the PresentationInfo.updateDocumentProperties method that allows you to make changes to a presentation’s properties.
This PHP code shows you how to edit a presentation’s properties:
$info = PresentationFactory->getInstance()->getPresentationInfo("pres.pptx");
$props = $info->readDocumentProperties();
$props->setTitle("My title");
$info->updateDocumentProperties($props);
Useful Links
To get more information about a presentation and its security attributes, you may find these links useful: