PresentationManager Class
Manager for handling PowerPoint presentations in memory during AI agent operations. Provides presentation lifecycle management with automatic cleanup.
Implements
Inherited Members
Namespace: Syncfusion.AI.AgentTools.PowerPoint
Assembly: Syncfusion.DocumentSDK.AI.AgentTools.dll
Syntax
public class PresentationManager : DocumentManagerBase<IPresentation>, IDocumentManager
Constructors
PresentationManager(Nullable<TimeSpan>)
Initializes a new instance of the PresentationManager class.
Declaration
public PresentationManager(Nullable<TimeSpan> expirationTime = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<System.TimeSpan> | expirationTime | Time before presentations are automatically cleaned up. Default is 30 minutes. |
Properties
ActivePresentationId
Gets the currently active presentation ID.
Declaration
public string ActivePresentationId { get; }
Property Value
| Type | Description |
|---|---|
| System.String | The active presentation ID, or null if no presentation is active. |
DocumentIdPrefix
Gets the prefix used for generating unique presentation identifiers.
Declaration
protected override string DocumentIdPrefix { get; }
Property Value
| Type | Description |
|---|---|
| System.String | The prefix string "ppt_" used for PowerPoint presentation IDs. |
Overrides
DocumentType
Gets the document type managed by this manager.
Declaration
public override DocumentType DocumentType { get; }
Property Value
| Type | Description |
|---|---|
| DocumentType | DocumentType.PowerPoint indicating this manager handles PowerPoint presentations. |
Overrides
Methods
CloseDocument(IPresentation)
Closes and releases the resources associated with the PowerPoint presentation.
Declaration
protected override void CloseDocument(IPresentation document)
Parameters
| Type | Name | Description |
|---|---|---|
| IPresentation | document | The IPresentation instance to close. |
Overrides
CreateDocumentInstance()
Creates a new empty PowerPoint presentation instance.
Declaration
protected override IPresentation CreateDocumentInstance()
Returns
| Type | Description |
|---|---|
| IPresentation | A new IPresentation instance ready for editing. |
Overrides
Dispose()
Disposes the Presentation Manager and all managed presentations.
Declaration
public void Dispose()
ExportDocumentInstance(IPresentation, String)
Exports the PowerPoint presentation to the specified file path.
Declaration
protected override void ExportDocumentInstance(IPresentation document, string filePath)
Parameters
| Type | Name | Description |
|---|---|---|
| IPresentation | document | The IPresentation instance to export. |
| System.String | filePath | The file path where the presentation will be saved in PPTX format. |
Overrides
ImportDocumentInstance(String)
Imports an existing PowerPoint presentation from the specified file path.
Declaration
protected override IPresentation ImportDocumentInstance(string filePath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath | The file path to the PowerPoint presentation to load. |
Returns
| Type | Description |
|---|---|
| IPresentation | An IPresentation instance loaded from the specified file. |
Overrides
ImportDocumentInstance(String, String)
Imports an encrypted PowerPoint presentation from the specified file path using the provided password.
Declaration
protected override IPresentation ImportDocumentInstance(string filePath, string password)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath | The file path to the encrypted PowerPoint presentation. |
| System.String | password | The password required to open the encrypted presentation. |
Returns
| Type | Description |
|---|---|
| IPresentation | An IPresentation instance loaded from the specified file with decryption applied. |