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 DocumentProperties

Header: include/Aspose/Slides/Foss/document_properties.h


Built-in Properties

PropertyAccessorDescription
set_title(const std::string&)WriteSet the document title.
set_subject(const std::string&)WriteSet the document subject.
set_author(const std::string&)WriteSet the document author.
set_keywords(const std::string&)WriteSet document keywords.
set_comments(const std::string&)WriteSet document comments.
set_category(const std::string&)WriteSet the document category.
set_content_status(const std::string&)WriteSet content status.
set_content_type(const std::string&)WriteSet content type.
set_last_saved_by(const std::string&)WriteSet last saved by.
set_company(const std::string&)WriteSet the company name.
set_manager(const std::string&)WriteSet the manager name.
set_name_of_application(const std::string&)WriteSet the application name.
set_presentation_format(const std::string&)WriteSet the presentation format.
set_application_template(const std::string&)WriteSet the application template.
set_hyperlink_base(const std::string&)WriteSet the hyperlink base URL.
revision_number() / set_revision_number(int)Read/WriteRevision number.
created_time() / set_created_time(...)Read/WriteCreation timestamp.
last_saved_time() / set_last_saved_time(...)Read/WriteLast saved timestamp.
last_printed() / set_last_printed(...)Read/WriteLast printed timestamp.
total_editing_time() / set_total_editing_time(...)Read/WriteTotal editing time.
shared_doc() / set_shared_doc(bool)Read/WriteWhether the document is shared.
scale_crop() / set_scale_crop(bool)Read/WriteScale crop setting.
links_up_to_date() / set_links_up_to_date(bool)Read/WriteWhether links are up to date.
hyperlinks_changed() / set_hyperlinks_changed(bool)Read/WriteWhether hyperlinks changed.

Statistics (Read-only)

PropertyDescription
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

MethodDescription
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);

See Also