Last active
December 13, 2024 23:24
-
-
Save aspose-cloud-kb/ef0c0d40a0854e32148e47324896451f to your computer and use it in GitHub Desktop.
Add Notes to PowerPoint Slide with C# REST API. https://kb.aspose.cloud/slides/net/add-comments-to-powerpoint-with-net-rest-api/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Aspose.Slides.Cloud.Sdk; | |
using Aspose.Slides.Cloud.Sdk.Model; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
namespace AsposeTestCodes | |
{ | |
class Program | |
{ | |
static void Main(string[] args) // For adding slide notes | |
{ | |
SlidesApi slidesApi = new SlidesApi("Client ID", "Key");// API object for notes | |
FilesUploadResult uploadResult = slidesApi.UploadFile("SamplePresentation.pptx", | |
new MemoryStream(File.ReadAllBytes("SamplePresentation.pptx"))); | |
// Prepare notes for the slide. | |
var notes = new NotesSlide{Text = "Here are the notes for the speaker"}; | |
// Add notes on the. third slide | |
var currentNotesSlide = slidesApi.CreateNotesSlide("SamplePresentation.pptx", 3, notes); | |
Stream stream = slidesApi.DownloadFile("SamplePresentation.pptx"); | |
var fs = new FileStream("UpdatedPresentation.pptx", | |
FileMode.Create, FileAccess.Write); // File stream for speaker notes | |
stream.CopyTo(fs);// save to file | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment