Presentation.DocumentProperties Property
Obtains presentation document properties.
Namespace: DevExpress.Docs.Presentation
Assembly: DevExpress.Docs.Presentation.v25.1.dll
NuGet Package: DevExpress.Docs.Presentation
Declaration
Property Value
Type | Description |
---|---|
DocumentProperties | Document properties associated with the presentation. |
Remarks
DocumentProperties
obtains all document properties. You have the option to select between built-in and custom document properties.
Built-In Document Properties
The following code snippet specifies built-in document properties:
using DevExpress.Docs.Presentation;
//...
using (var presentation = new Presentation(File.ReadAllBytes("C:\\Documents\\Presentation.pptx")))
{
var documentProperties = presentation.DocumentProperties;
documentProperties.Author = "Jane Doe";
documentProperties.Title = " Innovating for the Future: Trends in Sustainable Technology";
documentProperties.Company = "GreenTech Solutions Inc.";
documentProperties.Keywords = "Sustainability, Green Technology, Innovation, Future Trends, Eco-Friendly Solutions";
presentation.SaveDocument(new FileStream("C:\\Documents\\Presentation_upd.pptx", FileMode.Create));
}
Obtain or Specify Custom Document Properties
The DocumentProperties.CustomProperties property allows you to specify custom document properties. Call the Add method to add a new custom property:
The following code snippet creates new custom properties:
using DevExpress.Docs.Presentation;
using (var presentation = new Presentation(File.ReadAllBytes("C:\\Documents\\Presentation.pptx")))
{
var customProperties = presentation.DocumentProperties.CustomProperties;
customProperties.Add("string property", "string");
customProperties.Add("boolean property", true);
customProperties.Add("date property", DateTime.Now);
customProperties.Add("int property", 5);
customProperties.Add("double property", 2.55);
presentation.SaveDocument(new FileStream("C:\\Documents\\Presentation_upd.pptx", FileMode.Create));
}
See Also