DocumentProperties — Aspose.Slides FOSS for .NET API Reference

The DocumentProperties class provides access to all document metadata — core properties (title, author, subject), application properties (app version, company), and custom properties. Access it via Presentation.DocumentProperties.

Package: Aspose.Slides.Foss (net9.0)

using Aspose.Slides.Foss;
public class DocumentProperties : IDocumentProperties

Properties

Core Properties

PropertyTypeAccessDescription
TitlestringReadDocument title.
SubjectstringReadDocument subject.
AuthorstringReadAuthor name.
KeywordsstringReadKeywords/tags.
CommentsstringReadComments metadata.
CategorystringReadDocument category.
ContentStatusstringReadContent status.
ContentTypestringReadContent type.
CreatedTimeDateTime?ReadCreation date/time.
LastSavedTimeDateTime?ReadLast save date/time.
LastSavedBystringReadLast saved by.
LastPrintedDateTime?ReadLast printed date/time.
RevisionNumberintReadRevision number.

Application Properties

PropertyTypeAccessDescription
AppVersionstringReadApplication version.
NameOfApplicationstringReadCreating application name.
CompanystringReadCompany name.
ManagerstringReadManager name.
PresentationFormatstringReadPresentation format description.
ApplicationTemplatestringReadTemplate name.
HyperlinkBasestringReadBase URL for relative hyperlinks.
TotalEditingTimeTimeSpanReadTotal editing time.
SharedDocboolReadWhether the document is shared.

Statistics

PropertyTypeAccessDescription
SlidesintReadNumber of slides.
HiddenSlidesintReadNumber of hidden slides.
NotesintReadNumber of notes.
ParagraphsintReadNumber of paragraphs.
WordsintReadNumber of words.
MultimediaClipsintReadNumber of multimedia clips.

Custom Properties

PropertyTypeAccessDescription
CountOfCustomPropertiesintReadNumber of custom properties.

Methods

MethodReturnsDescription
GetCustomPropertyValue(string name)objectGet a custom property value by name.
SetCustomPropertyValue(string name, object value)voidSet a custom property value.
GetCustomPropertyName(int index)stringGet custom property name by index.
RemoveCustomProperty(string name)voidRemove a custom property.
ContainsCustomProperty(string name)boolCheck if a custom property exists.
ClearCustomProperties()voidRemove all custom properties.
ClearBuiltInProperties()voidReset all built-in properties.

Usage Examples

Read Document Properties

using Aspose.Slides.Foss;

using var prs = new Presentation("deck.pptx");
var props = prs.DocumentProperties;

Console.WriteLine($"Title: {props.Title}");
Console.WriteLine($"Author: {props.Author}");
Console.WriteLine($"Created: {props.CreatedTime}");
Console.WriteLine($"Slides: {props.Slides}");
Console.WriteLine($"Words: {props.Words}");

Set Document Properties

using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Export;

using var prs = new Presentation();
prs.DocumentProperties.Title = "Annual Report";
prs.DocumentProperties.Author = "Finance Team";
prs.DocumentProperties.Subject = "FY2025 Summary";
prs.DocumentProperties.Keywords = "finance, annual, report";
prs.Save("report.pptx", SaveFormat.Pptx);

Custom Properties

using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Export;

using var prs = new Presentation();
prs.DocumentProperties.SetCustomPropertyValue("ReviewStatus", "Approved");
prs.DocumentProperties.SetCustomPropertyValue("Version", 3);

Console.WriteLine(prs.DocumentProperties.ContainsCustomProperty("ReviewStatus"));
prs.Save("custom-props.pptx", SaveFormat.Pptx);

See Also