Read Information about Master Slides Introduction
Master slides contain the same fonts and images in one place for all slides in your presentation. When you edit a master slide, all slides that are based on that master slide will contain those changes. The following method allows you to read information of all master slides from a PowerPoint presentation.
GetMasterSlides
API
Type
Description
Resource
/slides/{name}/masterSlides
GET
Reads information of master slides from a presentation.
GetMasterSlides
Request Parameters
Name
Type
Location
Required
Description
name
string
path
true
The name of a presentation file.
password
string
header
false
The password to open the presentation.
folder
string
query
false
The path to the folder containing the presentation.
storage
string
query
false
The name of the storage contaning the folder
.
In case of Amazon S3 storage folder path starts with Amazon S3 bucket name.
Examples
Read titles of master slides from the document MyFolder/MyPresentation.pptx saved to the default storage.
cURL Solution
SDK Solutions
C#
// For complete examples and data files, please go to https://github.com/aspose-Slides-cloud/aspose-Slides-cloud-dotnet
using Aspose.Slides.Cloud.Sdk ;
using System ;
class Application
{
static void Main ()
{
var slidesApi = new SlidesApi ( "MyClientId" , "MyClientSecret" );
// Read information of master slides from the document MyFolder/MyPresentation.pptx.
var masterSlides = slidesApi . GetMasterSlides ( "MyPresentation.pptx" , null , "MyFolder" );
// Print titles of the master slides.
foreach ( var slide in masterSlides . SlideList )
{
Console . WriteLine ( slide . Title );
}
}
}
Java
// For complete examples and data files, please go to https://github.com/aspose-Slides-cloud/aspose-Slides-cloud-java
import com.aspose.slides.ApiException ;
import com.aspose.slides.api.SlidesApi ;
public class Application {
public static void main ( String [] args ) throws ApiException {
SlidesApi slidesApi = new SlidesApi ( "MyClientId" , "MyClientSecret" );
// Read information of master slides from the document MyFolder/MyPresentation.pptx.
MasterSlides masterSlides = slidesApi . getMasterSlides ( "MyPresentation.pptx" , null , "MyFolder" , null );
// Print titles of the master slides.
for ( ResourceUri slide : masterSlides . getSlideList ()) {
System . out . println ( slide . getTitle ());
}
}
}
PHP
// For complete examples and data files, please go to https://github.com/aspose-Slides-cloud/aspose-Slides-cloud-php
use Aspose\Slides\Cloud\Sdk\Api\Configuration ;
use Aspose\Slides\Cloud\Sdk\Api\SlidesApi ;
$configuration = new Configuration ();
$configuration -> setAppSid ( "MyClientId" );
$configuration -> setAppKey ( "MyClientSecret" );
$slidesApi = new SlidesApi ( null , $configuration );
// Read information of master slides from the document MyFolder/MyPresentation.pptx.
$masterSlides = $slidesApi -> getMasterSlides ( "MyPresentation.pptx" , null , "MyFolder" );
// Print titles of the master slides.
foreach ( $masterSlides -> getSlideList () as $slide ) {
echo $slide -> getTitle (), PHP_EOL ;
}
Ruby
# For complete examples and data files, please go to https://github.com/aspose-Slides-cloud/aspose-Slides-cloud-ruby
require "aspose_slides_cloud"
include AsposeSlidesCloud
configuration = Configuration . new
configuration . app_sid = "MyClientId"
configuration . app_key = "MyClientSecret"
slides_api = SlidesApi . new ( configuration )
# Read information of master slides from the document MyFolder/MyPresentation.pptx.
master_slides = slides_api . get_master_slides ( "MyPresentation.pptx" , nil , "MyFolder" )
# Print titles of the master slides.
for slide in master_slides . slide_list
puts slide . title
end
Python
# For complete examples and data files, please go to https://github.com/aspose-Slides-cloud/aspose-Slides-cloud-python
import asposeslidescloud
from asposeslidescloud.apis.slides_api import SlidesApi
slides_api = SlidesApi ( None , "MyClientId" , "MyClientSecret" )
# Read information of master slides from the document MyFolder/MyPresentation.pptx.
master_slides = slides_api . get_master_slides ( "MyPresentation.pptx" , None , "MyFolder" )
# Print titles of the master slides.
for slide in master_slides . slide_list :
print ( slide . title )
Node.js
// For complete examples and data files, please go to https://github.com/aspose-Slides-cloud/aspose-Slides-cloud-nodejs
const cloud = require ( "asposeslidescloud" );
const slidesApi = new cloud . SlidesApi ( "MyClientId" , "MyClientSecret" );
// Read information of master slides from the document MyFolder/MyPresentation.pptx.
slidesApi . getMasterSlides ( "MyPresentation.pptx" , null , "MyFolder" ). then ( masterSlides => {
// Print titles of the master slides.
masterSlides . body . slideList . forEach ( slide => {
console . log ( slide . title );
});
});
C++
// For complete examples and data files, please go to https://github.com/aspose-Slides-cloud/aspose-Slides-cloud-cpp
#include "asposeslidescloud/api/SlidesApi.h"
using namespace asposeslidescloud :: api ;
int main ()
{
auto slidesApi = std :: make_shared < SlidesApi > ( L "MyClientId" , L "MyClientSecret" );
// Read information of master slides from the document MyFolder/MyPresentation.pptx.
auto masterSlides = slidesApi -> getMasterSlides ( L "MyPresentation.pptx" , L "" , L "MyFolder" ). get ();
// Print titles of the master slides.
for ( auto slide : masterSlides -> getSlideList ()) {
std :: wcout << slide -> getTitle () << std :: endl ;
}
return 0 ;
}
Perl
# For complete examples and data files, please go to https://github.com/aspose-Slides-cloud/aspose-Slides-cloud-perl
use AsposeSlidesCloud::Configuration ;
use AsposeSlidesCloud::SlidesApi ;
my $config = AsposeSlidesCloud::Configuration -> new ();
$config -> { app_sid } = "MyClientId" ;
$config -> { app_key } = "MyClientSecret" ;
my $slides_api = AsposeSlidesCloud::SlidesApi -> new ( config => $config );
# Read information of master slides from the document MyFolder/MyPresentation.pptx.
my %parameters = ( name => "MyPresentation.pptx" , folder => "MyFolder" );
my $master_slides = $slides_api -> get_master_slides ( %parameters );
# Print titles of the master slides.
for my $slide ( @ { $master_slides -> { slide_list }}) {
print ( $slide -> { title }, "\n" );
}
Swift
Go
SDKs
Check Available SDKs to learn how to add an SDK to your project.