原創|產品更新|編輯:李顯亮|2019-07-02 11:33:24.777|閱讀 279 次
概述:Aspose.Slides for .NET更新至v19.6,新增支持從演示文稿中提取VBA宏、為文本框設置鎖定寬高比等多項功能!
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
Aspose.Slides for .NET是一個獨特的演示處理API,它允許應用程序讀取、寫入、修改和轉換PowerPoint演示文稿。作為一個獨立的API,它提供了管理PowerPoint關鍵功能的功能,如管理文本、形狀、表格和動畫、向幻燈片添加音頻和視頻、預覽幻燈片等,而不需要Microsoft PowerPoint。
Aspose.Slides for .NET更新至v19.6,新增支持從演示文稿中提取VBA宏、為文本框設置鎖定寬高比等多項功能!
【下載Aspose.Slides for .NET最新試用版】
key | 概述 | 類別 |
---|---|---|
SLIDESNET-40010 | 在圖表中設置外部工作簿的外部工作簿路徑 | 調查 |
SLIDESNET-41093 | 將演示文稿另存為內存流問題 | 調查 |
SLIDESNET-40958 | 新增將演示文稿另存為HTML時,使每個頁面都自給自足的選項 | 新功能 |
SLIDESNET-40672 | 支持從演示文稿中提取VBA宏 | 新功能 |
SLIDESNET-34681 | 支持PDF轉換百分比的進展 | 新功能 |
SLIDESNET-41101 | 實現PDF轉換百分比的進度 | 新功能 |
SLIDESNET-41142 | 支持設置鎖定長寬比的文本框 | 新功能 |
SLIDESNET-41092 | IColorFormat.Color不返回有效顏色 | 新功能 |
SLIDESNET-31569 | 在PowerPoint圖表中添加自定義行 | 新功能 |
SLIDESNET-30385 | 使用編輯數據自動刷新圖表 | 新功能 |
SLIDESNET-16733 | Fusion Asrts支持Aspose.Slides | 新功能 |
SLIDESNET-18215 | 支持Aspose.Slides中的ComponentArt圖表對象 | 新功能 |
SLIDESNET-12438 | SmartArt和圖表對象實現PPTX -> PDF | 增強 |
SLIDESNET-41149 | 生成框和晶須圖表 | 增強 |
SLIDESNET-41090 | PPTX文件未正確轉換為PDF | Bug修復 |
更多更新細則請參考:【Aspose.Slides for .NET v19.6更新說明】
▲添加了BackgroundEffectiveData類和IBackgroundEffectiveData接口
已經添加了Aspose.Slides.IBackgroundEffectiveData接口和Aspose.Slides.BackgroundEffectiveData類的實現。它們代表幻燈片的有效背景,包含有效填充格式和有效效果格式的信息。
▲添加了IBaseSlide.CreateBackgroundEffective方法
CreateBackgroundEffective方法已添加到IBaseSlide接口和BaseSlide類中。使用此方法可以獲得幻燈片背景的有效值。
以下示例代碼輸出有效的背景填充:
Presentation pres = new Presentation("SamplePresentation.pptx"); IBackgroundEffectiveData effBackground = pres.Slides[0].CreateBackgroundEffective(); if (effBackground.FillFormat.FillType == FillType.Solid) Console.WriteLine("Fill color: " + effBackground.FillFormat.SolidFillColor); else Console.WriteLine("Fill type: " + effBackground.FillFormat.FillType);
▲添加了新的IProgressCallback接口
新的IProgressCallback接口已添加到ISaveOptions接口和SaveOptions抽象類中。IProgressCallback接口表示用于以百分比保存進度更新的回調對象。
以下示例代碼輸出有效的背景填充:
public interface IProgressCallback { ////// Reports a progress update. //////A value of the updated progress.void Reporting(double progressValue); }
下面的代碼片段顯示了如何使用IProgressCallback接口:
using (Presentation presentation = new Presentation(fileName)) { ISaveOptions saveOptions = new PdfOptions(); saveOptions.ProgressCallback = new ExportProgressHandler(); presentation.Save(pdfFileName, SaveFormat.Pdf, saveOptions); }
class ExportProgressHandler : IProgressCallback { public void Reporting(double progressValue) { // Use progress percentage value here } }
▲Pot值已添加到LoadFormat和SaveFormat枚舉中
新的Pot值已添加到Aspose.Slides.LoadFormat和Aspose.Slides.SaveFormat枚舉中。此值表示Microsoft PowerPoint 97-2003演示文稿模板格式。
▲增加了對作為BLOB的管理映像的支持
從版本19.6開始,Aspose.Slides支持將演示圖像作為BLOB進行管理。此外,新方法已添加到IImageCollection接口和ImageCollection類,以支持將大圖像添加為流以將它們視為BLOB:
IPPImage AddImage(Stream stream,LoadingStreamBehavior loadingStreamBehavior);
此示例演示如何包含大型BLOB(圖像)并防止高內存消耗。
static void AddingNewBlobImageToPresentation() { // supposed we have the large image file we want to include into the presentation const string pathToLargeImage = "largeImage.png"; // create a new presentation which will contain this image using (Presentation pres = new Presentation()) { using (FileStream fileStream = new FileStream(pathToLargeImage, FileMode.Open)) { // let's add the image to the presentation - we choose KeepLocked behavior, because we not // have an intent to access the "largeImage.png" file. IPPImage img = pres.Images.AddImage(fileStream, LoadingStreamBehavior.KeepLocked); pres.Slides[0].Shapes.AddPictureFrame(ShapeType.Rectangle, 0, 0, 300, 200, img); // save the presentation. Despite that the output presentation will be // large, the memory consumption will be low the whole lifetime of the pres object pres.Save("presentationWithLargeImage.pptx", SaveFormat.Pptx); } } }
ASPOSE技術交流QQ群(642018183)已開通,各類資源及時分享,歡迎交流討論!
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn