PowerPointプレゼンテーション 画像処理

カタログ化は、関連するアイテムを論理的にグループ化するための素晴らしい方法であり、関連するファイルを整理するためにフォルダーを使用することに慣れているので、スライドを意味のあるグループに整理するためにセクションを使用するという同様のアプローチを選択することができます。これは、コラボレーション中にスライドの所有権を明確にするために、各同僚にセクションを割り当てることができるという利点も提供します。また、真っ白な状態から始める場合は、セクションを使用してプレゼンテーションのアウトラインを作成できます。通常、セクションは、大量のスライドを含み、それらを論理的なグループに簡単に

進む前に、Aspose.Slides Cloud SDK for .NETをインストールする必要があります。最も簡単な方法は、次のコマンドをパッケージマネージャーコンソールで使用して、NuGet パッケージを使用することです。

Install-Package Aspose.Slides-Cloud -Version 21.2.0 

インストールが完了したら、次のステップは認証情報を取得することです。これにより、当社のAPIを簡単かつ安全に使用できるようになります。詳細については、訪れてください。

セクション管理

Aspose.Slides Cloud は、次の機能を提供します。

既存のプレゼンテーションセクションを取得する

リクエスト 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);

PowerPointのセクションを設定する

リクエスト URL

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

リクエストボディ

{ "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

新しいセクションを作成する

リクエスト 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);

セクション名を変更する

リクエスト 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

セクションとスライドを別の位置に移動する

リクエスト 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);

セクションを削除する

リクエスト 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);