PowerPoint-præsentation Behandling af billede

Katalogisering er en fantastisk måde at logisk gruppere relaterede elementer på, og da vi er fortrolige med brugen af mapper til at organisere relaterede filer, kan en lignende tilgang til at bruge sektioner vælges for at organisere dine dias i meningsfulde grupper. Det giver dig også muligheden for at tildele hver kollega en sektion for at gøre ejerskabet af diasene klart under samarbejdet. Og hvis du starter med en blank skabelon, kan du bruge sektioner til at skitsere din præsentation. Normalt er sektioner designet til at blive brugt med store præsentationer, der indeholder et stort antal dias, der nemt kan grupperes i logiske grupper, da det gør din præsentation lettere at navigere. Desuden kan sektionerne foldes sammen eller udvides i dias-navigationpanelet og navngives til nem

Før vi går videre, skal vi installere Aspose.Slides Cloud SDK til .NET, og den nemmeste måde er at bruge NuGet pakken ved at bruge følgende kommando i pakkeadministratorens konsol:

Install-Package Aspose.Slides-Cloud -Version 21.2.0 

Når installationen er gennemført, er det næste skridt at få godkendelsesoplysninger, så du nemt og sikkert kan bruge vores API’er. For yderligere oplysninger, besøg venligst

Sections management

Aspose.Slides Cloud giver mulighed for at

Få eksisterende præsentationsafsnit

Request URL

GET https://api.aspose.cloud/v3.0/slides/myPresentation.pptx/sections?folder=myFolder

C#.NET

string MyAppKey = "xxxxxxxx";    // Get AppKey and AppSID from https://dashboard.aspose.cloud/
string MyAppSid = "xxxxxxxx";    // Get AppKey and AppSID from https://dashboard.aspose.cloud/

SlidesApi api = new SlidesApi("MyAppSid", "MyAppKey");
GetSectionsRequest request = new GetSectionsRequest
{
    Name = "myPresentaion.pptx",
    Folder = "myFolder"
};
Sections sections = api.GetSections(tequest);
Console.WriteLine(sections.SectionList.Count);

Indstil PowerPoint-sektioner

Request URL

PUT https://api.aspose.cloud/v3.0/slides/myPresentation.pptx/sections?folder=myFolder

Request Body

{ "sectionList": [{ "name": "Section1", "firstSlideIndex": 1 }, { "name": "Section2", "firstSlideIndex": 4 }]}

C#.NET

string MyAppKey = "xxxxxxxx";    // Get AppKey and AppSID from https://dashboard.aspose.cloud/
string MyAppSid = "xxxxxxxx";    // Get AppKey and AppSID from https://dashboard.aspose.cloud/

SlidesApi api = new SlidesApi("MyAppSid", "MyAppKey");
Sections dto = new Sections
{
    SectionList = new List<Section>
    {
        new Section { Name = "Section1", FirstSlideIndex = 1 },
        new Section { Name = "Section2", FirstSlideIndex = 4 }
    }
};
PutSectionsRequest request = new PutSectionsRequest
{
    Name = "myPresentaion.pptx",
    Folder = "myFolder",
    Sections = dto
};
Sections sections = api.PutSections(request);
Console.WriteLine(sections.SectionList.Count); //2
Console.WriteLine(sections.SectionList[0].SlideList.Count); //3

Opret en ny sektion

Request URL

POST https://api.aspose.cloud/v3.0/slides/myPresentation.pptx/sections?folder=myFolder&sectionName=NewSection&slideIndex=4

C#.NET

string MyAppKey = "xxxxxxxx";    // Get AppKey and AppSID from https://dashboard.aspose.cloud/
string MyAppSid = "xxxxxxxx";    // Get AppKey and AppSID from https://dashboard.aspose.cloud/

SlidesApi api = new SlidesApi("MyAppSid", "MyAppKey");
PostSectionRequest request = new PostSectionRequest
{
    Name = "myPresentaion.pptx",
    Folder = "myFolder",
    SectionName = "NewSection",
    SlideIndex = 4
};
Sections sections = api.PostSection(request);
Console.WriteLine(sections.SectionList.Count);

Skift afsnitsnavn

Request URL

PUT https://api.aspose.cloud/v3.0/slides/myPresentation.pptx/sections/2?folder=myFolder&sectionName=UpdatedSection

C#.NET

string MyAppKey = "xxxxxxxx";    // Get AppKey and AppSID from https://dashboard.aspose.cloud/
string MyAppSid = "xxxxxxxx";    // Get AppKey and AppSID from https://dashboard.aspose.cloud/

SlidesApi api = new SlidesApi("MyAppSid", "MyAppKey");
PutSectionRequest request = new PutSectionRequest
{
    Name = "myPresentaion.pptx",
    Folder = "myFolder",
    SectionName = "UpdatedSection",
    SectionIndex = 2
};
Sections sections = api.PutSection(request);
Console.WriteLine(sections.SectionList[1].Name); //UpdatedSection

Flyt sektion og dias til en anden position

Request URL

POST https://api.aspose.cloud/v3.0/slides/myPresentation.pptx/sections/1/move?folder=myFolder&newPosition=2

C#.NET

string MyAppKey = "xxxxxxxx";    // Get AppKey and AppSID from https://dashboard.aspose.cloud/
string MyAppSid = "xxxxxxxx";    // Get AppKey and AppSID from https://dashboard.aspose.cloud/

SlidesApi api = new SlidesApi("MyAppSid", "MyAppKey");
PostSectionMoveRequest request = new PostSectionMoveRequest
{
    Name = "myPresentaion.pptx",
    Folder = "myFolder",
    SectionIndex = 1,
    NewPosition = 2
};
Sections sections = api.PostSectionMove(request);
Console.WriteLine(sections.SectionList.Count);

Slet en sektion

Request URL

DELETE https://api.aspose.cloud/v3.0/slides/myPresentation.pptx/sections/2?folder=myFolder

C#.NET

string MyAppKey = "xxxxxxxx";    // Get AppKey and AppSID from https://dashboard.aspose.cloud/
string MyAppSid = "xxxxxxxx";    // Get AppKey and AppSID from https://dashboard.aspose.cloud/

SlidesApi api = new SlidesApi("MyAppSid", "MyAppKey");
DeleteSectionRequest request = new DeleteSectionRequest
{
    Name = "myPresentaion.pptx",
    Folder = "myFolder",
    SectionIndex = 2
};
Sections sections = api.DeleteSection(request);
Console.WriteLine(sections.SectionList.Count);