Hi,
If there is a way in which we can remove header-footer from the slide.
I am using Aspose.Slides .Net 15.2.0.0
Thanks
Garima
Hi,
Hi Garima,
I have observed your requirements and like to share that you can remove the header-footers from slides. They are actually defined in slide master; so you need to access master slide to remove them. Please try using the following sample code on your end to serve the purpose. Please share, if I may help you further in this regard.
Many Thanks,
public static void RemoveSlideHeaders()
{
String path=“D:\Aspose Data\”;
Presentation pres = new Presentation(path + “TestMaster.pptx”);
foreach(IMasterSlide master in pres.Masters)
{
//foreach(IShape shape in master.Shapes)
int cnt=master.Shapes.Count;
for (int i=0;i<cnt;i++)
{
IShape shape =master.Shapes[i];
if (shape is IAutoShape)
{
IAutoShape ashp = (IAutoShape)shape;
if (ashp.Placeholder.Type == PlaceholderType.Footer || ashp.Placeholder.Type == PlaceholderType.Header)
{
master.Shapes.Remove(ashp);
cnt–;
}
}
}
}
pres.Save(path + “RemovedMaster.pptx”, SaveFormat.Pptx);
}
Hi,
Hi Garima,
I have observed the feedback shared by you and request you to please share the working sample project, source presentation and slide snapshot highlighting what you want to remove from slide. I will be able to investigate the issue further on my end on availability of requested information from your side. Please share so that I may proceed further with my investigation.
Many Thanks,