Last active
October 29, 2022 01:31
-
-
Save aspose-com-kb/67102c6f6ef3d8a5b6706cd0f85b6c18 to your computer and use it in GitHub Desktop.
How to Access the Presentation Properties in Python. For more details: https://kb.aspose.com/slides/python/how-to-access-the-presentation-properties-in-python/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import aspose.slides as slides | |
# The path to source files directory | |
filePath = "C://Words//" | |
#Load the license in your application to read the presentation document properties | |
pptxDocsPropertiesLicense = slides.License() | |
pptxDocsPropertiesLicense.set_license(filePath + "Conholdate.Total.Product.Family.lic") | |
# Use the IPresentationInfo object to read the presentation info from the presentation factory | |
presInfo = slides.PresentationFactory.instance.get_presentation_info(filePath + "NewPresentation.pptx") | |
# Fetch the presentation document properties | |
props = presInfo.read_document_properties() | |
# Access and display the presentation document properties | |
print("Subject :"+ props.subject) | |
print("Title : "+props.title) | |
print("Author : "+props.author) | |
print("Comments : "+props.comments) | |
print("RevisionNumber : "+ str(props.revision_number)) | |
print("CreatedTime :" + props.created_time.strftime('%m/%d/%Y')) | |
print("Process Completed") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment