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#
Copy
using Aspose.Slides.Cloud.Sdk ;
using System ;
class Application
{
static void Main ( )
{
var slidesApi = new SlidesApi ( "MyClientId" , "MyClientSecret" );
var masterSlides = slidesApi . GetMasterSlides ( "MyPresentation.pptx" , null , "MyFolder" );
foreach ( var slide in masterSlides . SlideList )
{
Console . WriteLine ( slide . Title );
}
}
}
Java
Copy
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" );
MasterSlides masterSlides = slidesApi . getMasterSlides ( "MyPresentation.pptx" , null , "MyFolder" , null );
for ( ResourceUri slide : masterSlides . getSlideList ()) {
System . out . println ( slide . getTitle ());
}
}
}
PHP
Copy
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 );
$masterSlides = $slidesApi -> getMasterSlides ( "MyPresentation.pptx" , null , "MyFolder" );
foreach ( $masterSlides -> getSlideList () as $slide ) {
echo $slide -> getTitle (), PHP_EOL ;
}
Ruby
Copy
require "aspose_slides_cloud"
include AsposeSlidesCloud
configuration = Configuration . new
configuration . app_sid = "MyClientId"
configuration . app_key = "MyClientSecret"
slides_api = SlidesApi . new ( configuration )
master_slides = slides_api . get_master_slides ( "MyPresentation.pptx" , nil , "MyFolder" )
for slide in master_slides . slide_list
puts slide . title
end
Python
Copy
import asposeslidescloud
from asposeslidescloud.apis.slides_api import SlidesApi
slides_api = SlidesApi ( None , "MyClientId" , "MyClientSecret" )
master_slides = slides_api . get_master_slides ( "MyPresentation.pptx" , None , "MyFolder" )
for slide in master_slides . slide_list :
print ( slide . title )
Node.js
Copy
const cloud = require ( "asposeslidescloud" );
const slidesApi = new cloud . SlidesApi ( "MyClientId" , "MyClientSecret" );
slidesApi . getMasterSlides ( "MyPresentation.pptx" , null , "MyFolder" ). then ( masterSlides => {
masterSlides . body . slideList . forEach ( slide => {
console . log ( slide . title );
});
});
C++
Copy
#include "asposeslidescloud/api/SlidesApi.h"
using namespace asposeslidescloud :: api ;
int main ()
{
auto slidesApi = std :: make_shared < SlidesApi > ( L "MyClientId" , L "MyClientSecret" );
auto masterSlides = slidesApi -> getMasterSlides ( L "MyPresentation.pptx" , L "" , L "MyFolder" ). get ();
for ( auto slide : masterSlides -> getSlideList ()) {
std :: wcout << slide -> getTitle () << std :: endl ;
}
return 0 ;
}
Perl
Copy
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 );
my %parameters = ( name => "MyPresentation.pptx" , folder => "MyFolder" );
my $master_slides = $slides_api -> get_master_slides ( %parameters );
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.