Master Slide - background problem

Hi,

Both the master slides in the attached PPT contain the same picture as background . Aspose returns FillType for SlideMaster as FillType.SOLID instead of FillType.PICTURE.Please look into the issue and provide us a solution.

We use aspose.slides for Java version 1.8.3.

Regards
J.Karthikeyan

There are actually two master slides inside your presentation, if you see the FillType of other master, it will be a picture e.g

The following code

Presentation pres = new Presentation(new FileInputStream("d:\\downloads\\China Earthquake Brave Heros.pps"));
int mstrCount = pres.getMasters().size();

for (int i = 0; i < mstrCount; i++) {
    Slide mstr = pres.getMasters().get(i);
    FillFormat ffm = mstr.getBackground().getFillFormat();

    int fillType = ffm.getType();
    if (fillType == FillType.PICTURE)
        System.out.println("Fill Type is Picture");
    else
        System.out.println("Fill Type is Other");
}

OUTPUT:

Fill Type is Other
Fill Type is Picture

Hi,

What you have stated is correct and that is the problem too. Both the Master Slides contain a picture as background , but only one of the Masters return FillType as Picture .

Should not both the masters return FillType as PICTURE ?.

Regards
J.Karthikeyan

Actually, there are three master slides.

2 Slide Masters
1 Title Master

The background of 1 slide master and title master is Picture and the background of other slide master is solid fill, title master is present in Presentation.getSlides() collection and slide master is present in Presentation.getMasters() collection.

Means, Presentation.getSlides() can contain normal slides and title masters, if you check the id of every slide in there, you will see the id of title masters is greater or equal to 2147483648.

Hi,

Many thanks for your reply . It was really useful and cleared my doubts about Masters. Thou i knew that the getSlides method contain the Title Master(if any) , was thinking that the getMasters method will contain both the Title Master and Slide Master. Since only two masters were visible (when opened using Powerpoint) , did not get the idea of a presentation carrying three masters.

One more clarification needed , Is it possible for a presentation to have slides following all the three (or more) masters ?

Again , thanks for your reply.

Regards
J.Karthikeyan

TITLE MASTER is actually a slide and follows its SLIDE MASTER. However it acts as master for TITLE SLIDE. So, in theory, a single slide follows a single master.

If there is no TITLE MASTER, then TITLE SLIDE follows SLIDE MASTER.

Hi,

Thanks for your reply.

Regards
J.Karthikeyan