Browse our Products
Aspose.Slides for .NET 22.9 Release Notes
This page contains release notes for Aspose.Slides for .NET 22.9
Public API Changes
New method GetSubstitutions has been added to the IFontsManager interface
GetSubstitutions, a new method, has been added to the IFontsManager interface and FontsManager class.
The GetSubstitutions
method can be used to get information about fonts that will be replaced when a presentation is rendered.
Method declaration:
/// <summary>
/// Gets the information about fonts that will be replaced when the presentation is rendered.
/// </summary>
/// <returns>Collection of all fonts substitution <see cref="FontSubstitutionInfo"/>in the presentation rendering process</returns>
IEnumerable<FontSubstitutionInfo> GetSubstitutions();
/// <summary>
/// This structure represents information about the font replacement when it will be rendered.
/// </summary>
public class FontSubstitutionInfo
{
/// <summary>
/// Indicates source font name in presentation.
/// Read-only <see cref="string"/>
/// </summary>
public string OriginalFontName
/// <summary>
/// Indicates replacement font name for the original font.
/// Read-only <see cref="string"/>
/// </summary>
public string SubstitutedFontName
}
This C# code shows you how the GetSubstitutions
method is used to get all fonts that will be substituted when a presentation is rendered:
using (Presentation pres = new Presentation("pres.pptx"))
{
foreach (var fontSubstitution in pres.FontsManager.GetSubstitutions())
{
Console.WriteLine("{0} -> {1}", fontSubstitution.OriginalFontName, fontSubstitution.SubstitutedFontName);
}
}
New Animation Timing properties were added - RepeatUntilEndSlide and RepeatUntilNextClick
These new properties have been added to the Timing class: RepeatUntilEndSlide and RepeatUntilNextClick.
Properties declaration:
/// <summary>
/// This attribute specifies whether the effect will be repeated until the end of the slide.
/// Read/write <see cref="bool"/>.
/// </summary>
/// <example>
/// <code>
/// [C#]
/// using (Presentation presentation = new Presentation("demo.pptx"))
/// {
/// // Gets the effects sequence for the first slide
/// ISequence effectsSequence = presentation.Slides[0].Timeline.MainSequence;
///
/// // Gets the first effect of the main sequence.
/// IEffect effect = effectsSequence[0];
///
/// // Changes the effect Timing/Repeat to "Until End of Slide"
/// effect.Timing.RepeatUntilEndSlide = true;
/// }
/// </code>
/// </example>
bool RepeatUntilEndSlide { get; set; }
/// <summary>
/// This attribute specifies whether the effect will be repeated until the next click.
/// Read/write <see cref="bool"/>.
/// </summary>
/// <example>
/// <code>
/// using (Presentation presentation = new Presentation("demo.pptx"))
/// {
/// // Gets the effects sequence for the first slide
/// ISequence effectsSequence = presentation.Slides[0].Timeline.MainSequence;
///
/// // Gets the first effect of the main sequence.
/// IEffect effect = effectsSequence[0];
///
/// // Changes the effect Timing/Repeat to "Until Next Click"
/// effect.Timing.RepeatUntilNextClick = true;
/// }
/// </code>
/// </example>
bool RepeatUntilNextClick { get; set; }
Example that shows how to change an effect Timing/Repeat setting to “Until End of Slide”:
using (Presentation presentation = new Presentation("demo.pptx"))
{
// Gets the effects sequence for the first slide
ISequence effectsSequence = presentation.Slides[0].Timeline.MainSequence;
// Gets the first effect of the main sequence.
IEffect effect = effectsSequence[0];
// Changes the effect Timing/Repeat to "Until End of Slide"
effect.Timing.RepeatUntilEndSlide = true;
}