Browse our Products

Aspose.Slides for .NET 17.8 Release Notes

KeySummaryCategory
SLIDESNET-39210Exception on loading presentationInvestigation
SLIDESNET-3102Support for embedded fontsFeature
SLIDESNET-19163Add support for PP2010 PPTX presentations with embedded videoFeature
SLIDESNET-37588Support embedding fonts in the PowerPoint documentsFeature
SLIDESNET-38901Support for switching Rows and Columns of chart dataFeature
SLIDESNET-39063Support for getting loaded fonts list from LoadExternalFonts()Feature
SLIDESNET-39101Support for setting offset values of stretched pictureFeature
SLIDESNET-39124Adding the picture border featureFeature
SLIDESNET-39088Difference between organization of text extracted from PPT and PPTXFeature
SLIDESNET-38910When PPT is converted to PDF, the font in output is changedBug
SLIDESNET-36508Presentation with Bezier Chart on it throws exceptionBug
SLIDESNET-39091Hyperlink is not replaced in PPT fileBug
SLIDESNET-39199Notes are truncated when saving as imageBug
SLIDESNET-35364Presentation repair message appear on converting PPT to PPTXBug
SLIDESNET-39003Table rendered as blurred in exported PDFBug
SLIDESNET-39055Equations are improperly rendered inside exported PDFBug
SLIDESNET-39085Shape connector does not anchor correctlyBug
SLIDESNET-33416I’ve got this error calling Presentation.CloneSlideBug
SLIDESNET-36166Repair file message appears on opening the generated PPTX fileBug
SLIDESNET-36167Repair file message appears on opening the generated PPTX fileBug
SLIDESNET-36985Exception on extracting internal slide hyperlinkBug
SLIDESNET-37989Animation are changed after saving pptBug
SLIDESNET-38472PPT changed after savingBug
SLIDESNET-38557OleObjectFrame with non-Microsoft office document failed to open in PowerPointBug
SLIDESNET-38602Superscript text is improperly displayed for text when viewed in ChromeBug
SLIDESNET-38618The line position was changed in a specific PPT fileBug
SLIDESNET-38904Text in exported SVG is misplacedBug
SLIDESNET-38943Gradient and Texture effects are missing in exported HTMLBug
SLIDESNET-38956Shape outlines on tables/charts are not rendered in PDF/PNGBug
SLIDESNET-38997Autofit in Aspose.Slides looks different than in PowerPointBug
SLIDESNET-39004Blank html generated from presentationBug
SLIDESNET-39006Compile warning is generated on accessing SlideSizeBug
SLIDESNET-39025PPT to SWF files not properly convertedBug
SLIDESNET-39043Information is removed from NotesMaster XML on saving presentationBug
SLIDESNET-39046Difference in Language ID for PPT and PPTX filesBug
SLIDESNET-39081The lines that content between boxes (in PPT) are changedBug
SLIDESNET-39083Action on shape are lost on saving PPTBug
SLIDESNET-39092Presentation gets corrupt on savingBug
SLIDESNET-39121Chart plot area missing in exported PDFBug
SLIDESNET-39126Exception on loading presentationBug
SLIDESNET-39140Hyperlink of “Run Program” type on text is not recognized in PPTBug
SLIDESNET-39161Link with OpenFile ActionType hyperlink is recognized as HyperlinkBug
SLIDESNET-39164External font not appliedBug
SLIDESNET-39187Newline rendering issues in paragraphBug

Public API Changes

Method FontsLoader.GetFontFolders has been added

Returns folders where font files are searched. Those are folders that have been added with LoadExternalFonts method as well as system font folders.

string[] fontFolders = FontsLoader.GetFontFolders();

Method IChartData.SwitchRowColumn() has been added

Swap the data over the axis. Data being charted on the X axis will move to the Y axis and vice versa.

using (Presentation pres = new Presentation())
{
  IChart chart = pres.Slides[0].Shapes.AddChart(ChartType.ClusteredColumn, 100, 100, 400, 300);

  chart.ChartData.SwitchRowColumn();
  pres.Save(outputFileName, SaveFormat.PPTX);
}

New EmbedFontCharacters enum and AddEmbeddedFont methods has been added

To allow embedding fonts into Presentation the new EmbedFontCharacters enum and two overloads of AddEmbeddedFont method have been added:

EmbedFontCharacters enum has two members:

  • OnlyUsed: Embed only the characters used in the presentation (best for reducing file size).
  • All: Embed all characters (best for editing by other people).

New method AddEmbeddedFont with two overloads has been added to IFontsManager interface and FontsManager implementation class:

To embed font from existed IFontData:

  • void AddEmbeddedFont(IFontData fontData, EmbedFontCharacters embedFontRule)

To embed font from a binary data:

  • void AddEmbeddedFont(byte[] fontData, EmbedFontCharacters embedFontRule)

Using these methods and choosing the desired embedding rule (represented by EmbedFontCharacters enum), all fonts used in Presentation can be embedded:

IFontData[] allFonts = pres.FontsManager.GetFonts();
IFontData[] embeddedFonts = pres.FontsManager.GetEmbeddedFonts();
foreach (IFontData font in allFonts)
{
  if (!embeddedFonts.Contains(font))
  {
    pres.FontsManager.AddEmbeddedFont(font, EmbedFontCharacters.All);
  }
}

Or, using the new features of .NET framework, this snippet can be replaced with the following:

IFontData[] allFonts = pres.FontsManager.GetFonts();
IFontData[] embeddedFonts = pres.FontsManager.GetEmbeddedFonts();
foreach (IFontData font in allFonts.Except(embeddedFonts))
{
  pres.FontsManager.AddEmbeddedFont(font, EmbedFontCharacters.All);
}

Please note that an ArgumentException will be thrown if embedded font which is already embedded will be added again using AddEmbeddedFont method.

NotesStyle property has been added to IMasterNotesSlide interface and MasterNotesSlide class

NotesStyle property has been added to IMasterNotesSlide interface and MasterNotesSlide class respectively.

This property specifies the style of a notes text.

using (Presentation presentation = new Presentation(path + "Presentation.pptx"))
{
  IMasterNotesSlide notesMaster = presentation.MasterNotesSlideManager.MasterNotesSlide;
  if (notesMaster != null)
  {
    // Get MasterNotesSlide text style
    ITextStyle notesStyle = notesMaster.NotesStyle;
	
	//Set symbol bullet for the first level paragraphs
	IParagraphFormat paragraphFormat = notesStyle.GetLevel(0);
	paragraphFormat.Bullet.Type = BulletType.Symbol;
  }
  presentation.Save(path + "Presentation-out.pptx", SaveFormat.Pptx);
}

StretchOffsetLeft, StretchOffsetTop, StretchOffsetRight and StretchOffsetBottom properties have been added to IPictureFillFormat interface and PictureFillFormat class

Properties StretchOffsetLeft, StretchOffsetTop, StretchOffsetRight and StretchOffsetBottom has been added to IPictureFillFormat interface and PictureFillFormat class respectively.

These properties specify a fill rectangle. When stretching of an image is specified, a source rectangle is scaled to fit the specified fill rectangle.

Each edge of the fill rectangle is defined by a percentage offset from the corresponding edge of the shape’s bounding box. A positive percentage specifies an inset, while a negative percentage specifies an outset.

For example, a left offset of 25% specifies that the left edge of the fill rectangle is located to the right of the bounding box’s left edge by an amount equal to 25% of the bounding box’s width.

Code example:

using (Presentation presentation = new Presentation())
{
  // Get the first slide of presentation
  ISlide slide = presentation.Slides[0];

  // Add an AutoShape of Rectangle type
  IAutoShape aShape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 100, 100, 300, 300);
  
  // Create image
  Bitmap img = new Bitmap("image.png");
  IPPImage imgEx = presentation.Images.AddImage(img);
  
  // Set shape's fill type
  aShape.FillFormat.FillType = FillType.Picture;
  
  // Set shape's picture fill mode
  aShape.FillFormat.PictureFillFormat.PictureFillMode = PictureFillMode.Stretch;
  
  // Set image to fill the shape
  aShape.FillFormat.PictureFillFormat.Picture.Image = imgEx;
  
  // Specify image offsets from the corresponding edge of the shape's bounding box
  aShape.FillFormat.PictureFillFormat.StretchOffsetLeft = 25;
  aShape.FillFormat.PictureFillFormat.StretchOffsetRight = 25;
  aShape.FillFormat.PictureFillFormat.StretchOffsetTop = -20;
  aShape.FillFormat.PictureFillFormat.StretchOffsetBottom = -10;

  // Save created presentation
  presentation.Save("StretchOffsetExample.pptx", SaveFormat.Pptx);
}