Spire.Presentation

Spire.Presentation 4.8.5 supports inserting images and videos to placeholders

We're pleased to announce Spire.Presentation 4.8.5. This version supports to insert images and videos to placeholders, supports to set radius of rounded rectangles, and supports to get the layout name of a specific slide. In addition, some bugs that occurred when loading and saving PowerPoint documents have been fixed. More details are as follows.

New Features:

  • Supports inserting images and video to placeholders.
  • Presentation ppt = new Presentation();
     ppt.LoadFromFile("test.pptx");
     for (int j=0;j < ppt.Slides.Count;j++)
     {
         ISlide slide = (ISlide)ppt.Slides[j];
         for (int i=0;i < slide.Shapes.Count;i++)
         {
             Shape shape = (Shape)slide.Shapes[i];
             switch(shape.Placeholder.Type)
             {
                 case PlaceholderType.Media:
                     shape.InsertVideo("Video.mp4");
                     break;
                 case PlaceholderType.Picture:
                     shape.InsertPicture("Logo.png");
                     break;
                 case PlaceholderType.Chart:
                     shape.InsertChart(ChartType.ColumnClustered);
                     break;
                 case PlaceholderType.Table:
                     shape.InsertTable(3,2);
                     break;
                 case PlaceholderType.Diagram:
                     shape.InsertSmartArt(SmartArtLayoutType.BasicBlockList);
                     break;
             }
         }
     }
    
  • Supports setting radius of rounded rectangle.
  • Presentation presentation = new Presentation();
    presentation.Slides[0].Shapes.InsertRoundRectangle(0, 60, 90, 100, 200, 36);
    presentation.Slides[0].Shapes.AppendRoundRectangle(60, 290, 100, 200, 50);
    presentation.SaveToFile("result.pdf", FileFormat.PDF);
    presentation.SaveToFile("result.pptx", FileFormat.Pptx2013);
    
  • Supports getting the layout name of a specific slide.
  • Presentation presentation = new Presentation();
     presentation.LoadFromFile(file);
     for (int i = 0; i < presentation.Slides.Count;i++ )
     {
         string name = presentation.Slides[i].Layout.Name;
     }
    

Bug Fixes:

  • Fixes the gradient color position issue for converting PPT to SVG.
  • Fixes the exception issue when loading PPT file.
  • Fixes the exception issue when saving PPT file.
  • Fixes the content format issue for converting PPT to image.
  • Fixes the content lost issue for converting PPT to image.
  • Fixes the slow issue when saving PPT file on Windows 10.

Click the link below to download Spire.Presentation 4.8.5
More information of Spire.Presentation new release or hotfix: