Presentation corruption

Hi There

I’m using Aspose.Slides to retrieve, translate, and rewrite text in PowerPoint presentations.
However, with one particular document I’m finding that PowerPoint cannot open it, claiming part of the file is missing. The funny thing is that Aspose.Slides can read in the newly saved file, generate thumbnails from it and generally perform fine with it. No exceptions are generated during the text modification stage so the file is saving properly.

I’m wondering what could cause this error?

I’ve attached the file for testing

Thanks

Eric

Hi Eric,

I did not find any problem at all. I can open the PPT provided by you with MS PowerPoint. I also rewrote the PPT after changing the text using Aspose.Slides and again, I was able to open the produced ppt with MS PowerPoint. I used the code below and the output presentation is attached.

Presentation pres = new Presentation("xplan.ppt");

ITextBox[] tb = PresentationScanner.GetAllTextBoxes(pres, false);

for (int i = 0; i < tb.Length;i++ )

foreach( Paragraph para in tb[i].Paragraphs )

foreach( Portion port in para.Portions )

if(port.Text.Contains("Product"))

port.Text="Replaced";

pres.Write("xplan1.ppt");

Hi Muhammad

Thanks for your reply. I guess I must be doing something wrong then. The problem seems to be related to master pages being modified . I’m wondering if it would be better skipping master pages altogether - we are only interested in retrieving content which is localisable to another language, and in the PowerPoint presentations I have seen so far, master slides generally do not contain such content, but define the layout of the body slides in the presentation. Would this be correct?

Hi Eric,

Master / Layout slides only define the default layout / style for new slides to be created in a presentation. So, in general, there seem no need to update the text in master slides.

Hi Muhammad

Thanks for your reply. I was thinking along the same lines - there isn’t currently a PowerPoint localisation tool on the market from what I can see, so it’s hard to know what customers will want! I agree with your post above so I will remove Master slide processing for now.

Thanks

Eric