How to Access the Presentation Properties in C#

This small topic focuses on how to access the Presentation properties in C# by following the information to configure the environment and step-by-step runnable sample code. The code example to read PPTX document properties in C# is very simple and can be used in any of the .NET supported applications running either in Windows, Linux or macOS.

Steps to Read PPTX Document Properties in C#

  1. Set up the environment to add Aspose.Slides for .NET to read the presentation properties
  2. Create an instance of the IPresentationInfo class to access the presentation info collection from the presentation factory
  3. Use the IDocumentProperties object to access the presentation document properties from the presentation info instance
  4. Access and print the document properties for the presentation

By adhering to the above steps in C# Presentation document properties can be accessed and manipulated using the simple API interface. The process commences by accessing the presentation information from presentation factory using a static PresentationFactory class and you don’t really need to load the presentation inside the DOM during this process. Then, by using the instance of IDocumentProperties the properties are accessed and displayed inside the console. However, you can read or write the accessed document properties as per your requirements.

Code to Read Presentation Properties in C#

With the help of the demonstrated code, one can read presentation properties in C# using very simple API calls. While accessing the presentation document properties using the PresentationFactory class, there is a very small memory footprint as the entire presentation is not loaded inside the Document Object Model. The DocumentProperties class not only lets you access and modify the pre-defined presentation properties but adds and accesses the custom document properties as well.

This simple tutorial entails how to read presentation properties using C#. If you are interested in learning about the process of signing a presentation, refer to the article on how to insert Signature in PowerPoint using C#.