Set PPTX slide properties, set slide protection properties using C# .NET Cloud REST API, Free signup

Slide protection preview

PowerPoint Presentations have properties containing details about a presentation such as a title, author name, subject, and keywords that identify the document’s topic or contents, etc. It is important to specify relevant values for the presentation’s Property attributes because they help to identify the presentation. Whereas, individual slides within the presentation have properties associated with them such as Height, Width, Orientation, slide index in presentation, SizeType, etc.

Quick Tip

In order to get details regarding the current hosted version of Aspose.Slides Cloud API, please try using the following command

curl -X GET "https://api.aspose.cloud/v3.0/slides/info" \
-H "accept: application/json" \
-H "authorization: Bearer <JWT Token>"

Response Body

{
  "name": "Aspose.Slides for Cloud",
  "version": "21.1.0"
}

We are going to shed some light regarding following topics in this blog.

Get Slide Properties

The API provides the capabilities to get Slide Properties using the cURL command as well as you may try using the respective programming SDK to fulfill this requirement.

cURL command

curl -X GET "https://api.aspose.cloud/v3.0/slides/input.pptx/slideProperties" \
-H "accept: application/json" \
-H "authorization: Bearer <JWT Token>"

Request URL

https://api.aspose.cloud/v3.0/slides/input.pptx/slideProperties

Response Body

{
  "firstSlideNumber": 1,
  "orientation": "Landscape",
  "sizeType": "Widescreen",
  "width": 960,
  "height": 540,
  "selfUri": {
    "href": "https://api.aspose.cloud/v3.0/slides/input.pptx/slideProperties",
    "relation": "self"
  }
}

C# .NET

Set Slide Properties

Aspose.Slides Cloud also provides the capabilities to set the properties for PowerPoint slides.

cURL command

curl -X PUT "https://api.aspose.cloud/v3.0/slides/input.pptx/slideProperties" \
-H "accept: application/json" \
-H "authorization: Bearer <JWT Token>" \
-H "Content-Type: application/json" \
-d "{ \"FirstSlideNumber\": 0, \"Orientation\": \"Portrait\", \"ScaleType\": \"DoNotScale\", \"SizeType\": \"OnScreen\", \"Width\": 600, \"Height\": 900, \"SelfUri\": { \"Href\": \"https://api.aspose.cloud/v3.0/slides/input.pptx/slideProperties\", \"Relation\": \"self\", \"LinkType\": \"\", \"Title\": \"Hello\" }, \"AlternateLinks\": [ { \"Href\": \"string\", \"Relation\": \"string\", \"LinkType\": \"string\", \"Title\": \"string\" } ]}"

C# .NET

Get Slide ProtectionProperties

The GetSlidesProtectionProperties method of API provides the capabilities to read the protection properties of presentation document.

curl -X GET "https://api.aspose.cloud/v3.0/slides/input.pptx/protectionProperties" \
-H "accept: application/json" \
-H "authorization: Bearer <JWT Token>"

C# .NET

Deprecated Methods

PUT fromHtml method is deprecated and will be deleted in 21.4 release. Use POST fromHtml method for both creating presentations and adding slides to it.

slideSize resource is deprecated and will be deleted in the 21.4 release. Use slideProperties resource instead.