DocumentProperties
Contents
[
Hide
]DocumentProperties class
Represents properties of a presentation.
public class DocumentProperties : IDocumentProperties, IGenericCloneable<IDocumentProperties>
Constructors
Name | Description |
---|---|
DocumentProperties() | Initializes new instance of class DocumentProperties . |
Properties
Name | Description |
---|---|
ApplicationTemplate { get; set; } | Returns or sets the template of a application. Read/write String. |
AppVersion { get; } | Returns the app version. Read-only String. |
Author { get; set; } | Returns or sets the author of a presentation. Read/write String. |
Category { get; set; } | Returns or sets the category of a presentation. Read/write String. |
Comments { get; set; } | Returns or sets the comments of a presentation. Read/write String. |
Company { get; set; } | Returns or sets the company property. Read/write String. |
ContentStatus { get; set; } | Returns or sets the content status of a presentation. Read/write String. |
ContentType { get; set; } | Returns or sets the content type of a presentation. Read/write String. |
CountOfCustomProperties { get; } | Returns the number of custom properties actually contained in a collection. Read-only Int32. |
CreatedTime { get; set; } | Returns the date a presentation was created. Values are in UTC. Read/write DateTime. |
HeadingPairs { get; } | Indicates the grouping of document parts and the number of parts in each group. Read-only IHeadingPair[]. |
HiddenSlides { get; } | Returns the number of hidden slides in a presentation document. Read-only Int32. |
HyperlinkBase { get; set; } | Returns or sets the HyperlinkBase document property. Read/write String. |
HyperlinksChanged { get; set; } | Specifies that one or more hyperlinks in this part were updated exclusively in this part by a producer. The next producer to open this document shall update the hyperlink relationships with the new hyperlinks specified in this part. Read/write Boolean. |
Item { get; set; } | Returns or sets the custom property associated with a specified name. Read/write Object. |
Keywords { get; set; } | Returns or sets the keywords of a presentation. Read/write String. |
LastPrinted { get; set; } | Returns the date when a presentation was printed last time. Read/write DateTime. |
LastSavedBy { get; set; } | Returns or sets the name of a last person who modified a presentation. Read/write String. |
LastSavedTime { get; set; } | Returns the date a presentation was last modified. Values are in UTC. Read-only in case of Presentation.DocumentProperties (because it will be updated internally while IPresentation object saving process). Can be changed via DocumentProperties instance returning by method ReadDocumentProperties Please see the example in UpdateDocumentProperties method summary. |
LinksUpToDate { get; set; } | Indicates whether hyperlinks in a document are up-to-date. Set this element to true to indicate that hyperlinks are updated. Set this element to false to indicate that hyperlinks are outdated. Read/write Boolean. |
Manager { get; set; } | Returns or sets the manager property. Read/write String. |
MultimediaClips { get; } | Returns the total number of sound or video clips that are present in the document. Read-only Int32. |
NameOfApplication { get; set; } | Returns or sets the name of the application. Read/write String. |
Notes { get; } | Returns the number of slides in a presentation containing notes. Read-only Int32. |
Paragraphs { get; } | Returns the total number of paragraphs found in a document if applicable. Read-only Int32. |
PresentationFormat { get; set; } | Returns or sets the intended format of a presentation. Read/write String. |
RevisionNumber { get; set; } | Returns or sets the presentation revision number. Read/write Int32. |
ScaleCrop { get; set; } | Indicates the display mode of the document thumbnail. Set this element to true to enable scaling of the document thumbnail to the display. Set this element to false to enable cropping of the document thumbnail to show only sections that fits the display. Read/write Boolean. |
SharedDoc { get; set; } | Determines whether the presentation is shared between multiple people. Read/write Boolean. |
Slides { get; } | Returns the total number of slides in a presentation document. Read-only Int32. |
Subject { get; set; } | Returns or sets the subject of a presentation. Read/write String. |
Title { get; set; } | Returns or sets the title of a presentation. Read/write String. |
TitlesOfParts { get; } | Specifies the title of each document part. These parts are not document parts but conceptual representations of document sections. Read-only Int32. |
TotalEditingTime { get; set; } | Total editing time of a presentation. Read/write TimeSpan. |
Words { get; } | Returns the total number of words contained in a document. Read-only Int32. |
Methods
Name | Description |
---|---|
ClearBuiltInProperties() | Clears and sets default values for all builtIn properties. |
ClearCustomProperties() | Removes all custom properties. |
Clone() | Clones current object |
CloneT() | Clones current object |
ContainsCustomProperty(string) | Check presents of a custom property with a specified name. |
GetCustomPropertyName(int) | Return a custom property name at the specified index. |
GetCustomPropertyValue(string, out bool) | Gets a named boolean value from the custom properties. |
GetCustomPropertyValue(string, out DateTime) | Gets a named DateTime value from the custom properties. |
GetCustomPropertyValue(string, out double) | Gets a named double value from the custom properties. |
GetCustomPropertyValue(string, out float) | Gets a named float value from the custom properties. |
GetCustomPropertyValue(string, out int) | Gets a named integer value from the custom properties. |
GetCustomPropertyValue(string, out string) | Gets a named string value from the custom properties. |
RemoveCustomProperty(string) | Remove a custom property associated with a specified name. |
SetCustomPropertyValue(string, bool) | Sets a named boolean custom property. |
SetCustomPropertyValue(string, DateTime) | Sets a named DateTime custom property. |
SetCustomPropertyValue(string, double) | Sets a named double custom property. |
SetCustomPropertyValue(string, float) | Sets a named float custom property. |
SetCustomPropertyValue(string, int) | Sets a named integer custom property. |
SetCustomPropertyValue(string, string) | Sets a named string custom property. |
Examples
The following example shows how to access built-in Properties of PowerPoint Presentation.
[C#]
// Instantiate the Presentation class that represents the presentation
using (Presentation pres = new Presentation(dataDir + "AccessBuiltin Properties.pptx"))
{
// Create a reference to IDocumentProperties object associated with Presentation
IDocumentProperties documentProperties = pres.DocumentProperties;
// Display the builtin properties
Console.WriteLine("Category : " + documentProperties.Category);
Console.WriteLine("Current Status : " + documentProperties.ContentStatus);
Console.WriteLine("Creation Date : " + documentProperties.CreatedTime);
Console.WriteLine("Author : " + documentProperties.Author);
Console.WriteLine("Description : " + documentProperties.Comments);
}
The following example shows how to modify built-in Properties of PowerPoint Presentation.
[C#]
// Instantiate the Presentation class that represents the Presentation
using (Presentation presentation = new Presentation(dataDir + "ModifyBuiltinProperties.pptx"))
{
// Create a reference to IDocumentProperties object associated with Presentation
IDocumentProperties documentProperties = presentation.DocumentProperties;
// Set the builtin properties
documentProperties.Author = "Aspose.Slides for .NET";
documentProperties.Title = "Modifying Presentation Properties";
documentProperties.Subject = "Aspose Subject";
// Save your presentation to a file
presentation.Save(dataDir + "DocumentProperties_out.pptx", SaveFormat.Pptx);
}
See Also
- interface IDocumentProperties
- interface IGenericCloneable<T>
- namespace Aspose.Slides
- assembly Aspose.Slides