Get a Slide Font Scheme Introduction
Aspose.Slides Cloud allows you to read information about a font scheme of a slide from a PowerPoint presentation. You can use the following method to find out major (heading) font and minor (body) font that have been set for Latin and East Asian text.
GetFontScheme
API
Type
Description
Resource
/slides/{name}/slides/{slideIndex}/theme/fontScheme
GET
Retrieves a font scheme from a presentation slide.
GetFontScheme
Request Parameters
Name
Type
Location
Required
Description
name
string
path
true
The name of a presentation file.
slideIndex
integer
path
true
The 1-based index of the slide.
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 information about the font scheme of the first slide 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 the font scheme from the first slide.
var fontScheme = slidesApi . GetFontScheme ( "MyPresentation.pptx" , 1 , null , "MyFolder" );
// Print the font scheme name.
Console . WriteLine ( fontScheme . Name );
}
}
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 the font scheme from the first slide.
FontScheme fontScheme = slidesApi . getFontScheme ( "MyPresentation.pptx" , 1 , null , "MyFolder" , null );
// Print the font scheme name.
System . out . println ( fontScheme . getName ());
}
}
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 the font scheme from the first slide.
$fontScheme = $slidesApi -> getFontScheme ( "MyPresentation.pptx" , 1 , null , "MyFolder" );
// Print the font scheme name.
echo $fontScheme -> getName ();
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 the font scheme from the first slide.
font_scheme = slides_api . get_font_scheme ( "MyPresentation.pptx" , 1 , nil , "MyFolder" )
# Print the font scheme name.
print font_scheme . name
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 the font scheme from the first slide.
font_scheme = slides_api . get_font_scheme ( "MyPresentation.pptx" , 1 , None , "MyFolder" )
# Print the font scheme name.
print ( font_scheme . name )
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 the font scheme from the first slide.
slidesApi . getFontScheme ( "MyPresentation.pptx" , 1 , null , "MyFolder" ). then ( fontScheme => {
// Print the font scheme name.
console . log ( fontScheme . body . name );
});
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 the font scheme from the first slide.
auto fontScheme = slidesApi -> getFontScheme ( L "MyPresentation.pptx" , 1 , L "" , L "MyFolder" ). get ();
// Print the font scheme name.
std :: wcout << fontScheme -> getName ();
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 the font scheme from the first slide.
my %parameters = ( name => "MyPresentation.pptx" , slide_index => 1 , folder => "MyFolder" );
my $font_scheme = $slides_api -> get_font_scheme ( %parameters );
# Print the font scheme name.
print ( $font_scheme -> { name });
Swift
Go
SDKs
Check Available SDKs to learn how to add an SDK to your project.