Title/slide master

Hi

I’m using aspose.slides component, and i want to know is there is a way in powerpoint to split Slide Master connection from Title Master, either making them both as Slide Master or breaking the link between Slide Master and Title Master.

What i am trying to do is to make my pot file with single Master Slide for later use with presentations.

I would be very pleased if anyone could help me.

Thanks


Dear Tajamal,

Thanks for considering Aspose.Slides.

I have tried to understand the problem specified by you but unfortunately, I am not able to completely understand your problem statement. Please share some more details about your problem along with the presentation data for necessary investigation as well. We are really keen to help you but need further details from your side.

We are sorry for your inconvenience,

Hi , i was maybe not clear enough, lets try again. :slight_smile:

I have this following code which outputs a file with master slides. Every master slide in that output file is either Title Master and Slide Master, which are joined, can i somehow break the join or make them both as Slide Master ?
I hope this explains to you.

Thanks

License license = new Aspose.Slides.License();
license.SetLicense(“Aspose.Slides.lic”);
Presentation output = new Presentation();
int count = 0;

foreach (string file in Directory.GetFiles(@“c:\potter\products”,"*.ppt"))
{
Presentation pres = new Presentation(file);
int intSlide = pres.Slides.Count;
for (int j = 0; j < intSlide; j++)
{
Slide _slide = pres.Slides[j];
if (_slide.SlideId >= 0x80000000)
{
Slide copy = pres.CloneSlide(_slide, count, output, new System.Collections.SortedList());
}
}
count++;
}

output.Masters.RemoveAt(0);
output.Write(@“C:\potter\pot\product.pot”);

Dear Tajamal,

We are sorry for your inconvenience,

If I am right in understanding the problem specified by you that you need single master for every cloned slide in presentation. When cloning slides from same presentation, if you use only one SortedList object for cloning from same source then only one master slide will be copied. Please visit these thread link 1 and link 2 for further information.

Thanks and Regards,

Hi, Thanks for the reply.

it might be little confusing, but the above code gets all Title/Slide Master by runing through a presentation and outputs to a “pot” file, which only has master slides. and i have found out that i cannot change the Title Master to a Slide Master.

What if i have saved a powerpoint presentation to a dabase, how do i get/attach the master from a pot file to a slide in the presentation?


ok here is something that i pulled out, which works for , “for now”. is there any better way ? in case you do not know what name the Master has?

public static int GetMasterID(Presentation outpres,Slide slidebyposition)
{
//if title master
for(int slide =0; slide < outpres.Slides.Count; slide++)
{
//check if the masterid is located in parent slides
if (slidebyposition.Parent.Slides[slide].SlideId == slidebyposition.MasterId)
{
for (int i = 0; i < outpres.Masters.Count; i++)
{
//if yes , then check what title master it is ? and return masterid from db
if (slidebyposition.Parent.Slides[slide].MasterId == outpres.Masters[i].SlideId)
{

if (slidebyposition.Parent.Slides[slide].Layout == SlideLayout.TitleMasterSlide)
{

//MasterID value from db is returned where “outpres.Masters[i].Name”
equals Master

return _MasterID;
}
}
}

}
}

//if slide master
for (int i = 0; i < outpres.Masters.Count; i++)
{
//if master id is located in the presentation, return masterid from db
if (slidebyposition.MasterId == outpres.Masters[i].SlideId)
{
//MasterID value from db is returned where “outpres.Masters[i].Name” equals Master
return _MasterID;
}
}
}

Hi Tajamal,

I am extremely sorry for the delayed response.

I have requested our development team to provide some technical support for your specified issues. An issue with ID 17187 has been created in our issue tracking system to provide support over the mentioned issues. As soon as some information is shared by them, I will be more than happy to share that with you.

Once again, I feel sorry for your nuisance,

Dear Tajamal,

We regret to inform you that Title and Slide Masters are not replaceable. They have different structure and different purpose. As far as saving the presentations slide to database, please use the following steps to accomplish that:

1. Remove all unnecessary slides (not masters)
2. Call DeleteUnusedMasters()
3. Save to database

Hope it resolves your queries.

Thanks and Regards,