DocumentProperties exposes the metadata stored in a .pptx file: core properties (title, author, keywords), application properties (slide count, total editing time), and an extensible set of custom properties.
Access via prs.document_properties.
Package: aspose.slides_foss
DocumentProperties
Core Properties (core.xml)
| Property | Type | Access | Description |
|---|
title | str | Read/Write | Presentation title. |
subject | str | Read/Write | Subject description. |
author | str | Read/Write | Author / creator name. |
keywords | str | Read/Write | Space- or comma-separated keyword list. |
comments | str | Read/Write | Free-text description (maps to dc:description). |
category | str | Read/Write | Content category. |
content_status | str | Read/Write | Workflow status (e.g. "Draft", "Final"). |
content_type | str | Read/Write | MIME or document type. |
last_saved_by | str | Read/Write | Display name of the person who last saved the file. |
revision_number | int | Read/Write | Save-count revision number. |
created_time | datetime | Read/Write | UTC creation timestamp. |
last_saved_time | datetime | Read/Write | UTC last-modified timestamp. |
last_printed | datetime | Read/Write | UTC time of the last print. |
Application Properties (app.xml — read-mostly)
| Property | Type | Access | Description |
|---|
app_version | str | Read | Application version string (e.g. "16.0000"). |
name_of_application | str | Read/Write | Creating application name. |
company | str | Read/Write | Company name. |
manager | str | Read/Write | Manager field. |
presentation_format | str | Read/Write | Intended presentation format description. |
application_template | str | Read/Write | Template file name. |
hyperlink_base | str | Read/Write | Base URL for relative hyperlinks. |
total_editing_time | timedelta | Read/Write | Cumulative time the file was open for editing. |
shared_doc | bool | Read/Write | Whether the document is shared. |
scale_crop | bool | Read/Write | Thumbnail scaling mode. |
links_up_to_date | bool | Read/Write | Whether external links have been refreshed. |
hyperlinks_changed | bool | Read/Write | Whether hyperlinks were modified in this part. |
Statistics (read-only)
| Property | Type | Description |
|---|
slides | int | Total number of slides. |
hidden_slides | int | Number of hidden slides. |
notes | int | Number of slides that have notes. |
paragraphs | int | Total paragraph count across all text frames. |
words | int | Total word count. |
multimedia_clips | int | Number of audio/video clips embedded. |
Structural read-only properties
| Property | Type | Description |
|---|
heading_pairs | list[IHeadingPair] | Document section groupings from app.xml. Each item has .name (str) and .count (int). |
titles_of_parts | list[str] | Titles of each named section in the document. |
Custom Properties
Custom properties are arbitrary name-value pairs stored in docProps/custom.xml.
| Method | Signature | Description |
|---|
set_custom_property_value | set_custom_property_value(name, value) | Set a custom property. value may be str, int, float, bool, or datetime. |
get_custom_property_value | get_custom_property_value(name, out_list) | Retrieve a value by name into out_list[0]. The list is cleared then populated. |
get_custom_property_name | get_custom_property_name(index) -> str | Return the name of the custom property at index. |
remove_custom_property | remove_custom_property(name) -> bool | Remove a custom property by name. Returns True if found and removed. |
contains_custom_property | contains_custom_property(name) -> bool | Check whether a named custom property exists. |
clear_custom_properties | clear_custom_properties() | Remove all custom properties. |
count_of_custom_properties | int (property) | Number of custom properties currently stored. |
Built-in Property Operations
| Method | Description |
|---|
clear_built_in_properties() | Reset all core and app properties to their defaults. |
Usage Example
Read and write presentation metadata
See Also