Get Presentation Fonts Introduction
Aspose.Slides Cloud API allows getting list of fonts used in the presentation. The list can be obtained from the presentation located in the storage or the presentation uploaded in the request body.
GetFonts
API
Type
Description
Resource
/slides/{name}/fonts
Get
Returns presentation fonts info.
GetFonts
Examples
cURL Example
The code examples below show how to obtain fonts information from presentations in the storage.
SDK Examples
C#
SlidesApi api = new SlidesApi ( "MyClientId" , "MyClientSecret" );
FontsData response = api . GetFonts ( "MyPresentation.pptx" );
Console . WriteLine ( "Count of fonts used in the presentation: " + response . List . Count );
Java
SlidesApi api = new SlidesApi ( "MyClientId" , "MyClientSecret" );
FontsData response = api . getFonts ( "MyPresentation.pptx" , null , null , null );
System . out . println ( "Count of fonts used in the presentation: " + response . getList (). size ());
PHP
use Aspose\Slides\Cloud\Sdk\Api\Configuration ;
use Aspose\Slides\Cloud\Sdk\Api\SlidesApi ;
use Aspose\Slides\Cloud\Sdk\Model\FontsData ;
$config = new Configuration ();
$config -> setAppSid ( "MyClientId" );
$config -> setAppKey ( "MyClientSecret" );
$api = new SlidesApi ( null , $config );
$result = $api -> getFonts ( "MyPresentation.pptx" );
print ( "Count of fonts used in the presentation: " . count ( $result -> getList ()));
Ruby
configuration = AsposeSlidesCloud :: Configuration . new
configuration . app_sid = "MyClientId"
configuration . app_key = "MyClientSecret"
api = AsposeSlidesCloud :: SlidesApi . new ( configuration )
#Code example will be added soon.
Python
import asposeslidescloud
from asposeslidescloud.configuration import Configuration
from asposeslidescloud.apis.slides_api import SlidesApi
configuration = Configuration ()
configuration . app_sid = 'MyClientId'
configuration . app_key = 'MyClientSecret'
api = SlidesApi ( configuration )
response = api . get_fonts ( "MyPresentation.pptx" )
print ( f "Count of fonts used in the presentation: { len(response.list) }" )
Node.js
const CloudSdk = require ( "asposeslidescloud" );
const api = new CloudSdk . SlidesApi ( "MyClientId" , "MyClientSecret" );
let response = await api . getFonts ( "MyPresentation.pptx" );
console . log ( "Count of fonts used in the presentation: " + response . body . list . length );
Go
cfg := asposeslidescloud . NewConfiguration ()
cfg . AppSid = "MyClientId"
cfg . AppKey = "MyClientSecret"
api := asposeslidescloud . NewAPIClient ( cfg )
fileName := "MyPresentation.pptx"
response , _ , e := api . SlidesApi . GetFonts ( fileName , "" , "" , "" )
if e != nil {
fmt . Printf ( "Error: %v." , e )
return
}
fmt . Printf ( "Count of fonts used in the presentation: %v" , len ( response . GetList ()))
C++
Perl
use AsposeSlidesCloud::Configuration ;
use AsposeSlidesCloud::SlidesApi ;
use AsposeSlidesCloud::Object::SlideComment ;
my $config = AsposeSlidesCloud::Configuration -> new ();
$config -> { app_sid } = "MyClientId" ;
$config -> { app_key } = "MyClientSecret" ;
my $api = AsposeSlidesCloud::SlidesApi -> new ( config => $config );
#Code example will be added soon.
Swift
GetFontsOnline
API
Type
Description
Resource
/slides/fonts
Get
Returns presentation fonts info.
GetFontsOnline
Examples
cURL Example
The code examples below show how to obtain fonts information from presentations in request body.
SDK Examples
C#
SlidesApi api = new SlidesApi ( "MyClientId" , "MyClientSecret" );
Stream file = File . OpenRead ( "MyPresentation.pptx" );
FontsData response = api . GetFontsOnline ( file );
Console . WriteLine ( "Count of fonts used in the presentation: " + response . List . Count );
Java
SlidesApi api = new SlidesApi ( "MyClientId" , "MyClientSecret" );
byte [] file = Files . readAllBytes ( Paths . get ( "MyPresentation.pptx" ));
FontsData response = api . getFontsOnline ( file , null );
System . out . println ( "Count of fonts used in the presentation: " + response . getList (). size ());
PHP
use Aspose\Slides\Cloud\Sdk\Api\Configuration ;
use Aspose\Slides\Cloud\Sdk\Api\SlidesApi ;
use Aspose\Slides\Cloud\Sdk\Model\FontsData ;
$config = new Configuration ();
$config -> setAppSid ( "MyClientId" );
$config -> setAppKey ( "MyClientSecret" );
$api = new SlidesApi ( null , $config );
$file = fopen ( "MyPresentation.pptx" , 'r' );
$result = $api -> getFontsOnline ( $file );
print ( "Count of fonts used in the presentation: " . count ( $result -> getList ()));
Ruby
configuration = AsposeSlidesCloud :: Configuration . new
configuration . app_sid = "MyClientId"
configuration . app_key = "MyClientSecret"
api = AsposeSlidesCloud :: SlidesApi . new ( configuration )
#Code example will be added soon.
Python
import asposeslidescloud
from asposeslidescloud.configuration import Configuration
from asposeslidescloud.apis.slides_api import SlidesApi
configuration = Configuration ()
configuration . app_sid = 'MyClientId'
configuration . app_key = 'MyClientSecret'
api = SlidesApi ( configuration )
with open ( "MyPresentation.pptx" , 'rb' ) as f :
source = f . read ()
response = api . get_fonts_online ( source )
print ( f "Count of fonts used in the presentation: { len(response.list) }" )
Node.js
const CloudSdk = require ( "asposeslidescloud" );
const fs = require ( "fs" );
const api = new CloudSdk . SlidesApi ( "MyClientId" , "MyClientSecret" );
const stream = fs . createReadStream ( "MyPresentation.pptx" );
let response = await api . getFontsOnline ( stream );
console . log ( "Count of fonts used in the presentation: " + response . body . list . length );
Go
cfg := asposeslidescloud . NewConfiguration ()
cfg . AppSid = "MyClientId"
cfg . AppKey = "MyClientSecret"
api := asposeslidescloud . NewAPIClient ( cfg )
document , e := ioutil . ReadFile ( "MyPresentation.pptx" )
response , _ , e := api . SlidesApi . GetFontsOnline ( document , "" )
if e != nil {
fmt . Printf ( "Error: %v." , e )
return
}
fmt . Printf ( "Count of fonts used in the presentation: %v" , len ( response . GetList ()))
C++
Perl
use AsposeSlidesCloud::Configuration ;
use AsposeSlidesCloud::SlidesApi ;
use AsposeSlidesCloud::Object::SlideComment ;
my $config = AsposeSlidesCloud::Configuration -> new ();
$config -> { app_sid } = "MyClientId" ;
$config -> { app_key } = "MyClientSecret" ;
my $api = AsposeSlidesCloud::SlidesApi -> new ( config => $config );
#Code example will be added soon.
Swift
SDK Source
The Aspose for Cloud SDKs can be downloaded from the following page: Available SDKs