Aspose.Slides for .NET 19.5 Release Notes

SLIDESNET-41051Time spending evaluation for PDF conversionInvestigation
SLIDESNET-41059Aspose.Slides for .NET: Rasterization or vectorization of Shapes without textFeature
SLIDESNET-41015Obtain default table background through APIFeature
SLIDESNET-40727Support for Convert SVG images to shapesFeature
SLIDESNET-40856Support for Size represents property for Bubble chartFeature
SLIDESNET-40730Support for Office 365 in Aspose.SlidesFeature
SLIDESNET-40237Support for hiding left slide thumbnails pane in generated PPTFeature
SLIDESNET-40870Support for comments replies in Aspose.SlidesFeature
SLIDESNET-39057Support to set chart external data source workbook pathFeature
SLIDESNET-40852Support for Funnel charts and 2D map charts - funnel chartFeature
SLIDESNET-41034Page numbers are incorrect when rendering with speaker notesBug
SLIDESNET-41049The icon of OLE embedded object is changed after click on itBug
SLIDESNET-41081PDF Bullets not shown generated by Aspose.SlidesBug
SLIDESNET-40823PPTX to PDF - unwanted bullets occur before textBug
SLIDESNET-40892The label text is placed within the chart in the output PDFBug
SLIDESNET-35995The text shall consist of two lines on clouds shape in serialized PPT presentationBug
SLIDESNET-36251InvalidOperationException on saving presentationBug
SLIDESNET-37504TextAutoFit.Normal is not working when saving as PPTBug
SLIDESNET-41037PPT not properly converted to JPGBug
SLIDESNET-40991Field Footer Null using Aspose.SlidesBug
SLIDESNET-40969Chart workbook gets corrupt on updatingBug
SLIDESNET-35336Different in Bullet Color for PPT and PPTX fileBug
SLIDESNET-41020Hyperlinks are not working in cloned presentationBug
SLIDESNET-36891Strikethrough missing in exported PPT presentationBug
SLIDESNET-40979Connector is not connected to a shape inside the groupBug
SLIDESNET-41060Wrong chart renderingBug
SLIDESNET-40962Charts missing in generated PDFBug
SLIDESNET-37505ParagraphFormat.setMarginRight can not work on PPTBug
SLIDESNET-40993Edit data on powerpoint chart created through Slides.Net gets this errorBug
SLIDESNET-39621Slide not properly renderedBug
SLIDESNET-41058Exception on converting slide into SVGBug
SLIDESNET-41080PPT not properly converted to PDFBug
SLIDESNET-38475Text size is changed after saving PPTBug
SLIDESNET-41045Character spacing lost in generated HTMLBug
SLIDESNET-41075Gradient effects are not getting applied properlyBug
SLIDESNET-41040Formatting of speakernotes is incorrectBug
SLIDESNET-40731ZlibException on loading presentationBug
SLIDESNET-40757PPTX not properly converted to PDFBug
SLIDESNET-40871ODP file not properly converted to PPTXBug
SLIDESNET-40755Chart is improperly rendered in generated PDF and HTMLBug

Public API Changes

IComment.ParentComment property has been added

A new property ParentComment has been added to IComment interface and Comment class.

It allows to get or set the parent comment, thus creating a dialog in the form of a hierarchy of comments and replies.

Pay attention that Remove method of IComment interface removes the comment with all its replies.

Note. If setting ParentComment leads to a circular reference, the exception of type PptxEditException will be thrown.

The code snippet below shows a sample of adding some comments and some replies to them:

using (Presentation pres = new Presentation())
    // Add comment
    ICommentAuthor author1 = pres.CommentAuthors.AddAuthor("Author_1", "A.A.");
    IComment comment1 = author1.Comments.AddComment("comment1", pres.Slides[0], new PointF(10, 10), DateTime.Now);

    // Add reply for comment1
    ICommentAuthor author2 = pres.CommentAuthors.AddAuthor("Autror_2", "B.B.");
    IComment reply1 = author2.Comments.AddComment("reply 1 for comment 1", pres.Slides[0], new PointF(10, 10), DateTime.Now);
    reply1.ParentComment = comment1;

    // Add reply for comment1
    IComment reply2 = author2.Comments.AddComment("reply 2 for comment 1", pres.Slides[0], new PointF(10, 10), DateTime.Now);
    reply2.ParentComment = comment1;

    // Add reply to reply
    IComment subReply = author1.Comments.AddComment("subreply 3 for reply 2", pres.Slides[0], new PointF(10, 10), DateTime.Now);
    subReply.ParentComment = reply2;

    IComment comment2 = author2.Comments.AddComment("comment 2", pres.Slides[0], new PointF(10, 10), DateTime.Now);
    IComment comment3 = author2.Comments.AddComment("comment 3", pres.Slides[0], new PointF(10, 10), DateTime.Now);

    IComment reply3 = author1.Comments.AddComment("reply 4 for comment 3", pres.Slides[0], new PointF(10, 10), DateTime.Now);
    reply3.ParentComment = comment3;

    // Display hierarchy on console
    ISlide slide = pres.Slides[0];
    var comments = slide.GetSlideComments(null);
    for (int i = 0; i < comments.Length; i++)
        IComment comment = comments[i];
        while (comment.ParentComment != null)
            comment = comment.ParentComment;

        Console.Write("{0} : {1}", comments[i].Author.Name, comments[i].Text);

    // Remove comment1 and all its replies

The normal view consists of three content regions: the slide itself, a side content region, and a bottom content region. Properties pertaining to the positioning of the different content regions. This information allows the application to save its view state to the file, so that when reopened the view is in the same state as when the presentation was last saved.

Property IViewProperties.NormalViewProperties has been added to provide access to normal view properties of presentation. 

INormalViewProperties, INormalViewRestoredProperties interfaces and its descendants, SplitterBarStateType enum have been added. 



Represents normal view properties.

Property ShowOutlineIcons specifies whether the application should show icons if displaying outline content in any of the content regions of normal view mode.

Property SnapVerticalSplitter specifies whether the vertical splitter should snap to a minimized state when the side region is sufficiently small.

Property PreferSingleView specifies whether the user prefers to see a full-window single-content region over the standard normal view with three content regions.If enabled, the application may choose to display one of the content regions in the entire window.

Properties VerticalBarState and HorizontalBarState specify the state that the horizontal or vertical splitter bar should be shown in. A horizontal splitter bar separates the slide from the content region below the slide, vertical splitter bar separates the slide from the side content region. Possible values are: SplitterBarStateType.Minimized, SplitterBarStateType.Maximized and SplitterBarStateType.Restored.

Properties RestoredLeft and RestoredTop specify the sizing of the top or side slide region of the normal view, when SplitterBarStateType.Restored value applied for VerticalBarState and HorizontalBarState accordingly*.*


Specifies the sizing of the slide region ((width when a child of RestoredTop, height when a child of RestoredLeft) of the normal view, when the region is of a variable restored size(neither minimized nor maximized). 

Property DimensionSize  specifies the size of the slide region (width when a child of restoredTop, height when a child of restoredLeft).

Property AutoAdjust specifies whether the size of the side content region should compensate for the new size when resizing the window containing the view within the application

using (Presentation pres = new Presentation())
    pres.ViewProperties.NormalViewProperties.HorizontalBarState = SplitterBarStateType.Restored;
    pres.ViewProperties.NormalViewProperties.VerticalBarState = SplitterBarStateType.Maximized;

    pres.ViewProperties.NormalViewProperties.RestoredTop.AutoAdjust = true;
    pres.ViewProperties.NormalViewProperties.RestoredTop.DimensionSize = 80;
    pres.ViewProperties.NormalViewProperties.ShowOutlineIcons = true;

    pres.Save("presentation.pptx", SaveFormat.Pptx);
New IOleObjectFrame .SubstitutePictureTitle property has been added

A new property SubstitutePictureTitle has been added to IOleObjectFrame interface and OleObjectFrame class. It allows to get, set or change the caption of an OLE icon:

/// <summary>
/// Returns or set the title for OleObject icon.
/// Read/write <see cref="string"/>.
/// </summary>
/// <remarks>
/// When IsObjectIcon == false this value is ignored.
/// The string can be truncated according to the size of the Ole icon.
/// </remarks>
string SubstitutePictureTitle { get; set; }

The code snippet below shows a sample of creating Excel object and setting its caption:

string oleSourceFile = "ExcelObject.xlsx";
string oleIconFile = "Image.png";

using (Presentation pres = new Presentation())
    IPPImage image = null;
    ISlide slide = pres.Slides[0];

    // Add Ole objects
    byte[] allbytes = File.ReadAllBytes(oleSourceFile);
    IOleObjectFrame oof = slide.Shapes.AddOleObjectFrame(20, 20, 50, 50, "Excel.Sheet.12", allbytes);
    oof.IsObjectIcon = true;

    // Add image object
    byte[] imgBuf = File.ReadAllBytes(oleIconFile);
    using (MemoryStream ms = new MemoryStream(imgBuf))
        image = pres.Images.AddImage(new Bitmap(ms));
    oof.SubstitutePictureFormat.Picture.Image = image;

    // Set caption to OLE icon
    oof.SubstitutePictureTitle = "Caption example";

Note. When property IsObjectIcon of an IOleObjectFrame is set to value of false then SubstitutePictureTitle property is ignored.

Pay attention, that the string value of SubstitutePictureTitle may be truncated according to the size of the Ole icon that represents the OLE object.

Support for the representation of bubble size values has been added.

Property BubbleSizeRepresentation has been added to IChartSeries, IChartSeriesGroup interfaces, and related classes. 

BubbleSizeRepresentation specifies how the bubble size values are represented in the bubble chart. Possible values are: BubbleSizeRepresentationType.Area and BubbleSizeRepresentationType.Width.

Accordingly, BubbleSizeRepresentationType enum has been added to specify the possible ways to represent data as bubble chart sizes.

using (Presentation pres = new Presentation())
    IChart chart = pres.Slides[0].Shapes.AddChart(ChartType.Bubble, 50, 50, 600, 400, true);

    chart.ChartData.SeriesGroups[0].BubbleSizeRepresentation = BubbleSizeRepresentationType.Width;

    pres.Save("Presentation.pptx", SaveFormat.Pptx);

Support of converting SVG images into group of shapes has been added.

Since version 19.5 Aspose.Slides supports converting SVG images into group of shapes. 

New ISvgImage interface and SvgImage class were added

New ISvgImage interface was added to represent SVG image:

/// <summary>
/// Represents an SVG image.
/// </summary>
[ComVisible(true), Guid("8BB43C22-78D1-4032-A149-82FCD3992F0F"), CsToCppPorter.CppVirtualInheritance("System.Object")]
public interface ISvgImage
       /// <summary>
       /// Returns SVG content.
       /// Read-only <see cref="string"/>.
       /// </summary>
       string SvgContent { get; }

       /// <summary>
       /// Returns SVG data.
       /// Read-only <see cref="T:byte[]"/>.
       /// </summary>
       byte[] SvgData { get; }

       /// <summary>
       /// Return callback interface used to resolve external resources during SVG documents import.
       /// Read-only <see cref="IExternalResourceResolver"/>.
       /// </summary>
       IExternalResourceResolver ExternalResourceResolver { get; }

       /// <summary>
       /// Returns base URI of the specified SVG. Used to resolve relative links.
       /// Read-only <see cref="string"/>.
       /// </summary>
       string BaseUri { get; }

AddImage method has been added to IImageCollection interface and ImageCollection class

New AddImage method has been added to IImageCollection interface and ImageCollection class:

/// <summary>
/// Add an image to a presentation from SVG object.
/// </summary>
/// <param name="svgImage">Svg image object <see cref="ISvgImage"/></param>
/// <returns>Added image.</returns>
/// <exception cref="ArgumentNullException">When svgImage parameter is null.</exception>
IPPImage AddImage(ISvgImage svgImage);

These methods provide ability to insert Svg fragment to the presentation’s image collection:

using (var p = new Presentation())
    string svgContent = File.ReadAllText(svgPath);
    ISvgImage svgImage = new SvgImage(svgContent);
    IPPImage ppImage = p.Images.AddImage(svgImage);
    p.Slides[0].Shapes.AddPictureFrame(ShapeType.Rectangle, 0, 0, ppImage.Width, ppImage.Height, ppImage);
    p.Save(outPptxPath, SaveFormat.Pptx);
using (var p = new Presentation())
    string svgContent = File.ReadAllText(new Uri(new Uri(baseDir), "image1.svg").AbsolutePath);
    ISvgImage svgImage = new SvgImage(svgContent, new ExternalResourceResolver(), baseDir);
    IPPImage ppImage = p.Images.AddImage(svgImage);
    p.Slides[0].Shapes.AddPictureFrame(ShapeType.Rectangle, 0, 0, ppImage.Width, ppImage.Height, ppImage);
    p.Save(outPptxPath, SaveFormat.Pptx);

Pay attention that methods IPPImage AddFromSvg(string svgContent) and IPPImage AddFromSvg(string svgContent, IExternalResourceResolver externalResResolver, string baseUri) marked now as obsolete and will be deleted from API since version 19.10.

Property SvgImage property has been added to IPPImage interface and PPImage class

New property SvgImage have been to IPPImage interface and PPImage class:

/// <summary>
/// Returns or sets ISvgImage object <see cref="ISvgImage"/>
/// </summary>
/// <remarks>This value indicates that this image has been created from svg.</remarks>
ISvgImage SvgImage { get; set; }

AddGroupShape method has been added to IShapeCollection interface and IShapeCollection class

New AddGroupShape method has been added to IShapeCollection interface and ShapeCollection class:

/// <summary>
/// Creates a new GroupShape, fills it with converted shapes from SVG and adds it to the end of the collection.
/// </summary>
/// <param name="svgImage">Svg image object <see cref="ISvgImage"/></param>
/// <param name="x">The X coordinate for the left side of the shape group frame.</param>
/// <param name="y">The Y coordinate for the top side of the shape group frame.</param>
/// <param name="width">The width of the group of the shape group frame.</param>
/// <param name="height">The height of a group of the shape group frame.</param>
/// <returns>Created GroupShape object.</returns>
IGroupShape AddGroupShape(ISvgImage svgImage, float x, float y, float width, float height);

This method allows to convert SvgImage object that represents SVG data into group of shapes:

using (Presentation pres = new Presentation(pptxFileName))
    PictureFrame pFrame = pres.Slides[0].Shapes[0] as PictureFrame;
    ISvgImage svgImage = pFrame.PictureFormat.Picture.Image.SvgImage;
    if (svgImage != null)
        // Convert svg image into group of shapes
        IGroupShape groupShape = pres.Slides[0].Shapes.AddGroupShape(svgImage, pFrame.Frame.X, pFrame.Frame.Y,
            pFrame.Frame.Width, pFrame.Frame.Height);
        // remove source svg image from presentation