Reading animations from a PPT file

Hi,

I was testing out Aspose Slides to see if our company could use it. One of our needed functionalities is to be able to figure out what type of animations are in a ppt file. I tried it out using a test presentation that had a “Stretch Across” effect, but when I used the shape.getEntryEffect() it returned ShapeEntryEffect.NONE instead of ShapeEntryEffect.STRETCH_ACROSS as I had expected.

Then I tried editing the presentation (I didn’t create it, it’s one of our company’s in-house documents, so I can’t exactly give it out) by changing the animation of the shape then changing it back to stretch across. After I saved this new copy of the ppt, the entry effect was correctly detected by the library.

Can you advise if this is a known issue or what else I can check?

Thanks!

Roy

Currently, Aspose.Slides support PowerPoint 2000 animations. It doesn’t support later animations. However, the new upcoming release of Aspose.Slides having support for pptx (PP2007) support will also support later animations.

Sorry, it’s not really related to an older animation. The question is why the animation cannot be detected in the existing file, but if I edit the file to add a shape with the same animation it can be detected?

BTW, can I ask when the new version you mentioned would become available?

If there are animations later than 2000 in presentation, then they will not be detected. Can you provide source presentations to further look into it?

Sometimes, existing presentations structure is broken and MS-PowerPoint can rectify them on the fly, but Aspose.Slides can't, so it cannot manipulate it well. You should open the existing presentation and then save it using Save As... menu command and then see, if it is working.

The release with support for pptx format is delayed, at least this month, because there are some problems with reading yet.

Hello,

Sorry for the confusion, I think it’s because I didn’t understand the structure of the Presentation correctly. Seems that there’s a master slide from which the other slides can inherit their style? The master slide had the animation I was looking for. Can I ask the ff: given a Shape in one of the slides, how can I find out w/c object in the master slide it inherits the styles from?

For the release of the new version, since I’m evaluating this product for possible purchase and future application development, is it possible to get a rough timeframe of when the version with ppt2k7 will become available? Next month? Next 2 months? Before year-end? etc.

Thanks very much.

Normal slides inherit everything from their masters including styles and animations. So if the animation is present on master then although it plays on normal slide but it actually locates on master of that slide.

Hopefully, the release will be available next month.

How can I know which shape in the master slide corresponds to the shape in the normal slide?

(Such that while reading the file I can determine what animation/style each shape would have)

Since the master slide shapes are located on master slide, you cannot access them from normal slide, they will be accessed from master only.

To get master slide, you can use this code snippet

Slide mstrSlid=srcPresentation.GetSlideById(normalSlide.MasterId);

Sorry if I’m not being clear enough or being annoying with the questions, but that’s still not what I mean, and I really need to know this answer before I can recommend to my company that we use your software.

I know how to get the master slide.
I know how to get the shapes in the master slide.
I know how to get the normal slides.
I know how to get the shapes in a normal slide.
I want to know if I can find out w/c shapes in the master slide correspond to the shape in the normal slide.

For example, master slide has 3 shapes, A, B, C

my normal slide has 3 shapes, I, J, K

How can I know, for example
whether shape I will inherit animations from shape A, or it will inherit animations from shape B, or it will inherit animations fro shape C?

I need to do this so I can identify the animation for every shape in the presentation, whether the animation is inherent to the shape or inherited from the master slide.

Hello Roy,

Sorry for confusion but shapes (except placeholders) can’t inherit animation from master slide.
Placeholders can do it and they always have “Click to edit…” text on master slide.

If you don’t see animation of normal shape in Aspose.Slides then it probably has >PP2000 animation.
After you set new animation in Aspose.Slides it’s stored in PP2000 format and you can see it later through API.

alcrus:
Hello Roy,

Sorry for confusion but shapes (except placeholders) can't inherit animation from master slide.
Placeholders can do it and they always have "Click to edit..." text on master slide.


Hi Alcrus, thank you very much for your reply. Actually in my testing I'm using a placeholder. For example, I was given a Ppt file that had a slide#1 with a title and a subtitle. The title has an animation of Stretch Across, which is a supported animation in PPT2000. My test is simply to read this file and see if I can describe the animations for every object in every slide.

When I iterate through the slides I can find that there's a slide #0 (by position), and it's the master slide. The master slide has a placeholder with text "Click to edit title" and animation of STRETCH_ACROSS. When I read slide #1, I find the placeholder with my title text there, but the entry effect assigned to it is NONE. So I figure it must be inheriting it from the corresponding placeholder in the master slide.

This is a case where I know the contents of the ppt file beforehand and as a human I can easily deduce which is the correct master slide placeholder that corresponds to my slide#1 placeholder. However, I would like to know if it's possible to handle the general case, i.e. I read in a ppt file that I don't know the contents of yet, and for each placeholder I'd like to determine what the corresponding master slide placeholder is so I can determine what is the entry effect for that placeholder.

Can the above be done using Aspose?

Thanks for your patience :)


If you don't see animation of normal shape in Aspose.Slides then it probably has >PP2000 animation.
After you set new animation in Aspose.Slides it's stored in PP2000 format and you can see it later through API.

In theory each shape has Id and Id of a master shape but currently there is no public API to get these properties.
I think we can make it public in the next hot fix so it will be possible to find the master shape with animation.

Thank you very much Alexey. I have no more issues :smiley: