DocumentProperties — Aspose.Slides FOSS for C++ API Reference
The DocumentProperties class provides access to built-in and custom metadata for a presentation.
Namespace: Aspose::Slides::Foss
#include <Aspose/Slides/Foss/document_properties.h>class DocumentPropertiesHeader: include/Aspose/Slides/Foss/document_properties.h
Built-in Properties
| Property | Accessor | Description |
|---|---|---|
set_title(const std::string&) | Write | Set the document title. |
set_subject(const std::string&) | Write | Set the document subject. |
set_author(const std::string&) | Write | Set the document author. |
set_keywords(const std::string&) | Write | Set document keywords. |
set_comments(const std::string&) | Write | Set document comments. |
set_category(const std::string&) | Write | Set the document category. |
set_content_status(const std::string&) | Write | Set content status. |
set_content_type(const std::string&) | Write | Set content type. |
set_last_saved_by(const std::string&) | Write | Set last saved by. |
set_company(const std::string&) | Write | Set the company name. |
set_manager(const std::string&) | Write | Set the manager name. |
set_name_of_application(const std::string&) | Write | Set the application name. |
set_presentation_format(const std::string&) | Write | Set the presentation format. |
set_application_template(const std::string&) | Write | Set the application template. |
set_hyperlink_base(const std::string&) | Write | Set the hyperlink base URL. |
revision_number() / set_revision_number(int) | Read/Write | Revision number. |
created_time() / set_created_time(...) | Read/Write | Creation timestamp. |
last_saved_time() / set_last_saved_time(...) | Read/Write | Last saved timestamp. |
last_printed() / set_last_printed(...) | Read/Write | Last printed timestamp. |
total_editing_time() / set_total_editing_time(...) | Read/Write | Total editing time. |
shared_doc() / set_shared_doc(bool) | Read/Write | Whether the document is shared. |
scale_crop() / set_scale_crop(bool) | Read/Write | Scale crop setting. |
links_up_to_date() / set_links_up_to_date(bool) | Read/Write | Whether links are up to date. |
hyperlinks_changed() / set_hyperlinks_changed(bool) | Read/Write | Whether hyperlinks changed. |
Statistics (Read-only)
| Property | Description |
|---|---|
slides() | Number of slides. |
hidden_slides() | Number of hidden slides. |
notes() | Number of notes slides. |
paragraphs() | Total paragraph count. |
words() | Total word count. |
multimedia_clips() | Number of multimedia clips. |
Custom Properties
| Method | Description |
|---|---|
count_of_custom_properties() | Number of custom properties. |
get_custom_property_value(const std::string& name) | Get a custom property value. |
set_custom_property_value(const std::string& name, ...) | Set a custom property value. |
get_custom_property_name(int index) | Get custom property name by index. |
remove_custom_property(const std::string& name) | Remove a custom property. |
contains_custom_property(const std::string& name) | Check if a custom property exists. |
clear_custom_properties() | Remove all custom properties. |
clear_built_in_properties() | Reset all built-in properties to defaults. |
Usage Example
#include <Aspose/Slides/Foss/presentation.h>
using namespace Aspose::Slides::Foss;
Presentation prs;
auto& props = prs.document_properties();
props.set_title("Q1 Results");
props.set_author("Finance Team");
props.set_subject("Quarterly Review");
prs.save("q1.pptx", SaveFormat::Pptx);