Issue removing Footer on Slides for Xps Convertion

Hi,

I'm trying to remove the footer from a slide but is not working, and if I try to save the file show as Corrupted.
the code that I'm using is:

int slnum = doc.Slides.LastSlidePosition;
for (int i = 1; i <= slnum; i++)
{
Slide sl = doc.GetSlideByPosition(i);

//sl.HeaderFooter = new HeaderFooter();
sl.HeaderFooter.FooterVisible = true;
sl.HeaderFooter.FooterText = string.Empty;
}

//this.RemoveFooter(doc.Slides);
//doc.MainMaster.Shapes.ToString();

if (doc.MainMaster != null)
{
foreach (Shape shape in doc.MainMaster.Shapes)
{
if (shape.TextFrame != null)
{
shape.TextFrame.AlternativeText = string.Empty;
shape.TextFrame.Text = string.Empty;
}
}
//doc.MainMaster.Shapes[4].TextFrame.Text= string.Empty

When I try to generate and Xps using this code the footer appears always,

Regards,

Hi Gerardo,

Thanks for your interest in Aspose.Slides.

It would be great, If you can share your presentation file for investigation purposes.

Hi Tahir,


Sure, here are some example files,

Regards,

Hi Gerardo,

Please
accept my apology for late response. I have tested the scenario and I
am able to reproduce the same problem. I think you have created this PPT file in PowerPoint 2007 or modify footer in PowerPoint 2007. Please let me know about this. Aspose.Slides does not support HeaderFooter for PPTX. Header and Footers are created as auto shapes for PPTX.

I have created a PPT file in PowerPoint 2003 with footer and used the following code snippet to remove the footer. Please find the PPT file in attachment.

Presentation pres = new Presentation(@“d:\pptx\Footer.ppt”);
pres.Slides[0].HeaderFooter.FooterVisible = false;
pres.Slides[0].HeaderFooter.FooterText = “Footer Text Changed”;
pres.Save(@“d:\pptx\AsposeOut.ppt”, Aspose.Slides.Export.SaveFormat.Ppt);

Please let me know, If you have any further queries.