Browse our Products

Aspose.Slides for PHP via Java 22.9 Release Notes

KeySummaryCategory
SLIDESPHP-11Use Aspose.Slides for Java 22.9 featuresEnhancement

Public API Changes

New method GetSubstitutions has been added to the FontsManager class

GetSubstitutions, a new method, has been added to the FontsManager class.

The GetSubstitutions method can be used to get information about fonts that will be replaced when a presentation is rendered.

Method declaration:

/**
 * <p>
 * Gets the information about fonts that will be replaced on the presentation's rendering.
 * </p>
 * @return Collection of all fonts substitution {@link FontSubstitutionInfo}.
 */
public final IGenericEnumerable<FontSubstitutionInfo> getSubstitutions()
/**
 * <p>
 * This structure represents the information about the font replacement when it will be rendered.
 * </p>
 */
public class FontSubstitutionInfo
{
    /**
     * <p>
     * Indicates source font name in presentation.
     * Read-only {@link String}
     * </p>
     */
    public final String getOriginalFontName()

    /**
     * <p>
     * Indicates the replacement font name for the original font.
     * Read-only {@link String}
     * </p>
     */
    public final String getSubstitutedFontName()
}

This PHP code shows you how the GetSubstitutions method is used to get all fonts that will be substituted when a presentation is rendered:

$pres = new Presentation("pres.pptx");

$iter = $pres->getFontsManager()->getSubstitutions()->iterator();

while (java_values($iter->hasNext()))
{
	$fontSubstitution = $iter->next();
	
	echo $fontSubstitution->getOriginalFontName()." - ".$fontSubstitution->getSubstitutedFontName()."\n";
}

New Animation Timing methods were added - RepeatUntilEndSlide and RepeatUntilNextClick

These new methods have been added to the Timing class: setRepeatUntilEndSlide, getRepeatUntilEndSlide, setRepeatUntilNextClick and getRepeatUntilNextClick.

Methods declaration:

/**
 * <p>
 *  This attribute specifies if the effect will repeat until the end of the slide.
 *  Read/write {@code boolean}.
 *  </p>
 */
public final boolean getRepeatUntilEndSlide()

/**
 * <p>
 *  This attribute specifies if the effect will repeat until the end of the slide.
 *  Read/write {@code boolean}.
 *  </p>
 */
public final void setRepeatUntilEndSlide(boolean value)

/**
 * <p>
 *  This attribute specifies if the effect will repeat until the next click.
 *  Read/write {@code boolean}.
 *  </p>
 */
public final boolean getRepeatUntilNextClick()

/**
 * <p>
 *  This attribute specifies if the effect will repeat until the next click.
 *  Read/write {@code boolean}.
 *  </p>
 */
public final void setRepeatUntilNextClick(boolean value)

Example that shows how to change an effect Timing/Repeat setting to “Until End of Slide”:

$presentation = new Presentation("demo.pptx");

// Gets the effects sequence for the first slide
$effectsSequence = $presentation->getSlides()->get_Item(0)->getTimeline()->getMainSequence();

// Gets the first effect of the main sequence.
$effect = $effectsSequence->get_Item(0);

// Changes the effect Timing/Repeat to "Until End of Slide"
$effect->getTiming()->setRepeatUntilEndSlide(true);