public void Slides_Text_Tests() { try { SlidesTextItemsResponse slidesTextItemsResponse = slidesService.Text.ExtractPresentationTextItems("slide-sample.pptx", Utils.CloudStorage_Output_Folder); SlidesTextItemsResponse slidesTextItemsResponse2 = slidesService.Text.ExtractSlideTextItems("slide-sample.pptx", 1, Utils.CloudStorage_Output_Folder); storageService.File.CopyFile(Utils.CloudStorage_Input_Folder + "/slide-sample.pptx", Utils.CloudStorage_Output_Folder + "/slide-sample.pptx"); SlidesDocumentResponse slidesDocumentResponse = slidesService.Text.ReplaceTextByNewValue("slide-sample.pptx", "Aspose", "Aspose Pty. Ltd", Utils.CloudStorage_Output_Folder); SlidesDocumentResponse slidesDocumentResponse2 = slidesService.Text.ReplaceTextByNewValue("slide-sample.pptx", 1, "Aspose", "Aspose Pty. Ltd", Utils.CloudStorage_Output_Folder); } catch (Exception ex) { Assert.Fail(ex.Message); } }
public void Slides_Merge_Tests() { try { storageService.File.CopyFile(Utils.CloudStorage_Input_Folder + "/slide-sample.pptx", Utils.CloudStorage_Output_Folder + "/slide-sample.pptx"); PresentationRequest presentationRequest = new PresentationRequest(); Presentation presentation = new Presentation(Utils.CloudStorage_Input_Folder + "/slide-sample1.pptx"); Presentation presentation2 = new Presentation(Utils.CloudStorage_Input_Folder + "/slide-sample2.pptx"); presentationRequest.Presentations.Add(presentation); presentationRequest.Presentations.Add(presentation2); SlidesDocumentResponse slidesDocumentResponse = slidesService.MergeDocument.MergePresentations("slide-sample.pptx", Utils.CloudStorage_Output_Folder, presentationRequest); storageService.File.CopyFile(Utils.CloudStorage_Input_Folder + "/slide-sample.pptx", Utils.CloudStorage_Output_Folder + "/slide-sample.pptx"); PresentationRequest presentationRequest2 = new PresentationRequest(); List <int> slides = new List <int>(); slides.Add(1); slides.Add(2); Presentation presentation3 = new Presentation(Utils.CloudStorage_Input_Folder + "/slide-sample1.pptx", slides); Presentation presentation4 = new Presentation(Utils.CloudStorage_Input_Folder + "/slide-sample2.pptx", slides); presentationRequest2.Presentations.Add(presentation3); presentationRequest2.Presentations.Add(presentation4); SlidesDocumentResponse slidesDocumentResponse2 = slidesService.MergeDocument.MergePresentationsWithSlides("slide-sample.pptx", Utils.CloudStorage_Output_Folder, presentationRequest2); storageService.File.DownloadFile(Utils.CloudStorage_Output_Folder + "/slide-sample.pptx", Utils.Local_Output_Path + "/slide-sample.pptx"); } catch (Exception ex) { Assert.Fail(ex.Message); } }
public void Slides_Tests() { try { SlidesDocumentResponse slidesDocumentResponse = slidesService.ReadPresentationInfo("slide-sample.pptx", Utils.CloudStorage_Output_Folder); slidesService.ExportToSomeFormat("slide-sample.pptx", SlidesOutputFormat.Html, Utils.CloudStorage_Output_Folder, Utils.Local_Output_Path + "slides-html-out.html"); System.Threading.Thread.Sleep(3000); // Just for testing slidesService.ExportToSomeFormat("slide-sample.pptx", SlidesOutputFormat.Html, Utils.CloudStorage_Output_Folder, Utils.CloudStorage_Output_Folder + "/slides-html-out.html"); slidesService.ExportToSomeFormat("slide-sample.pptx", SlidesOutputFormat.Tiff, Utils.CloudStorage_Output_Folder, Utils.Local_Output_Path + "slides-tiff-out.tiff"); System.Threading.Thread.Sleep(3000); // Just for testing slidesService.ExportToSomeFormat("slide-sample.pptx", SlidesOutputFormat.Tiff, Utils.CloudStorage_Output_Folder, Utils.CloudStorage_Output_Folder + "/slides-tiff-out.tiff"); storageService.File.RemoveFile(Utils.CloudStorage_Output_Folder + "/slide-created1.pptx"); slidesService.CreatePresentation("slide-created1.pptx", Utils.CloudStorage_Output_Folder, Utils.CloudStorage_Input_Folder + "/potx-sample.potx"); System.Threading.Thread.Sleep(3000); // Just for testing slidesService.CreatePresentationDocumentFromHtml("slide-created2.pptx", string.Empty, Utils.CloudStorage_Output_Folder, Utils.Local_Input_Path + "html-sample.html"); slidesService.ConvertPresentation(SlidesOutputFormat.Tiff, Utils.CloudStorage_Output_Folder + "/slides-converted.tiff", Utils.Local_Input_Path + "slide-sample.pptx"); System.Threading.Thread.Sleep(3000); // Just for testing SlidesSplitResponse slidesSplitResponse = slidesService.SplitPresentations("slide-sample.pptx", 400, 400, Utils.CloudStorage_Output_Folder, Utils.CloudStorage_Input_Folder); } catch (Exception ex) { Assert.Fail(ex.Message); } }