Extracting Revision History from PowerPoint Presentations Using Aspose.Slides

I have a requirement regarding tracking revision history of ppt file. is there any way we could extract the revision history data from a ppt file?

@dwpaspose

Cause

Currently, Aspose.Slides does not provide a direct method to extract revision history data from a PowerPoint presentation file. The revision history is typically not stored in a way that can be accessed programmatically through the Aspose.Slides API.

Solution

However, you can access and modify built-in and custom document properties of a presentation, which may include some relevant information about the document’s history, such as the last modified date and the author. This can be useful for tracking changes to some extent.

Code

Here’s a simple example of how to access built-in properties using Aspose.Slides for Java:

import com.aspose.slides.*;

public class PresentationPropertiesExample {
    public static void main(String[] args) {
        // Load the presentation
        Presentation presentation = new Presentation("YourPresentation.pptx");
        try {
            // Access document properties
            IDocumentProperties properties = presentation.getDocumentProperties();
            
            // Display built-in properties
            System.out.println("Author: " + properties.getAuthor());
            System.out.println("Title: " + properties.getTitle());
            System.out.println("Last Modified By: " + properties.getLastSavedBy());
            System.out.println("Modified Date: " + properties.getLastSavedTime());
        } finally {
            // Dispose of the presentation
            if (presentation != null) presentation.dispose();
        }
    }
}

Next Steps

If you need detailed revision history, consider maintaining a separate log or version control system for your presentations. You can also explore using custom properties to store specific revision information as you make changes to the presentation.

Please let me know if you have any further questions or need additional assistance!

@dwpaspose,

Aspose.Slides may not offer a direct way to track changes or revision history in a PowerPoint file. I think Microsoft PowerPoint app for desktop also does not include such a feature, lease feel free to correct me if I’m mistaken, and I’d appreciate any additional details on it. You might consider exploring the built-in and custom document properties of a presentation as an alternative approach. Kindly refer to the document for further information.
https://docs.aspose.com/slides/net/presentation-properties/

Microsoft Powerpoint actually has a method to identify track changes by merging or comparing the file as stated in this link : Track changes in your presentation - Microsoft Support

is there any poperties in aspose that could access it?

@dwpaspose,

We need to evaluate your requested feature in details. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-45048

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@dwpaspose,
Our developers have reviewed your requirements. Aspose.Slides is a PowerPoint presentation API, not a ready-made end-user tool like Microsoft PowerPoint. This means it provides rich programming interfaces (APIs) that developers can use to build custom solutions, including tools for comparing or merging presentations. For example, if you need to compare two presentations and highlight the differences, Aspose.Slides gives you the building blocks to do so. However, you must implement the comparison logic yourself—Aspose.Slides does not include a built-in Compare or Merge button like PowerPoint.

Below is a sample C# code snippet that demonstrates how you could start building such a tool by comparing text in shapes between two presentations and adding modern comments to highlight the changes:

using System;
using System.Drawing;
using System.Linq;
using Aspose.Slides;

class Program
{
    static void Main()
    {
        using (Presentation original = new Presentation("original.pptx"))
        using (Presentation modified = new Presentation("modified.pptx"))
        using (Presentation comparison = new Presentation())
        {
            // Remove default blank slide
            comparison.Slides.RemoveAt(0);

            // Add an author for modern comments
            var author = comparison.CommentAuthors.AddAuthor("Change Tracker", "CT");

            int slideCount = Math.Min(original.Slides.Count, modified.Slides.Count);

            for (int i = 0; i < slideCount; i++)
            {
                ISlide originalSlide = original.Slides[i];
                ISlide modifiedSlide = modified.Slides[i];

                // Clone the modified slide into the comparison presentation
                ISlide resultSlide = comparison.Slides.AddClone(modifiedSlide);

                // Compare shapes on the slides
                foreach (IShape originalShape in originalSlide.Shapes)
                {
                    if (originalShape is AutoShape originalAutoShape && originalAutoShape.TextFrame != null)
                    {
                        var modifiedShape = modifiedSlide.Shapes
                            .OfType<AutoShape>()
                            .FirstOrDefault(s => s.Name == originalShape.Name && s.TextFrame != null);

                        if (modifiedShape != null)
                        {
                            string originalText = originalAutoShape.TextFrame.Text ?? "";
                            string modifiedText = modifiedShape.TextFrame.Text ?? "";

                            if (!string.Equals(originalText, modifiedText, StringComparison.Ordinal))
                            {
                                // Add a modern comment to highlight the difference
                                    author.Comments.AddModernComment($"Text changed in shape \"{originalShape.Name}\":\nOld: {originalText}\nNew: {modifiedText}",
                                        resultSlide,
                                        modifiedShape,
                                        new PointF(originalShape.X + 10, originalShape.Y + 10),
                                        DateTime.Now);
                            }
                        }
                    }
                }
            }

            // Save the result presentation
            comparison.Save("ComparisonResult.pptx", SaveFormat.Pptx);
            Console.WriteLine("Comparison completed. See ComparisonResult.pptx");
        }
    }
}

Summary

  • Aspose.Slides does not automatically compare presentations like PowerPoint’s built-in Track Changes or Merge features.
  • Instead, it gives you full programmatic control to:
    • Open and inspect slides, shapes, and text.
    • Detect differences between them.
    • Build a custom comparison or merge workflow tailored to your needs.

This approach allows you to design a solution specific to your business logic while relying on Aspose.Slides as the foundation for working with PowerPoint files.