Get Portion Effective Values
Introduction
Effective values are format values that are actually applied to the portion. They are either explicitly set in the portion, or implicitly returned as a result of inheritance. They represent the final result of formatting that might be seen in the PowerPoint or in an exported document. For example, if the font height value is not defined for the specific portion of text, the value from the default portion format of the parent paragraph will be taken, if availiable. If not, the value is taken from the presentation theme.
You can also get effective values for Paragraphs .
API
Type
Description
Resource
/slides/{name}/slides/{slideIndex}/shapes/{shapeIndex}/paragraphs/{paragraphIndex}/portions/{portionIndex}/effective
GET
Get portion effective
GetPortionEffective
/{name}/slides/{slideIndex}/shapes/{path}/{shapeIndex}/paragraphs/{paragraphIndex}/portions/{portionIndex}/effective
GET
Get sub-shape portion effective
GetSubshapePortionEffective
cURL Example
The code example below shows how to obtain “effective formatting values” from a portion.
SDK Source
The Aspose for Cloud SDKs can be downloaded from the following page: Available SDKs
SDK Examples
C#
SlidesApi api = new SlidesApi ( "MyClientId" , "MyClientSecret" );
int slideIndex = 1 ;
int shapeIndex = 1 ;
int paragraphIndex = 1 ;
int portionIndex = 1 ;
Portion response = api . GetPortionEffective ( "MyPresentation.pptx" , slideIndex , shapeIndex , paragraphIndex , portionIndex );
Console . WriteLine ( $"The portion font size is \" { response . FontHeight } \ "." );
Java
SlidesApi api = new SlidesApi ( "MyClientId" , "MyClientSecret" );
int slideIndex = 1 ;
int shapeIndex = 1 ;
int paragraphIndex = 1 ;
int portionIndex = 1 ;
Portion response = api . getPortionEffective ( "MyPresentation.pptx" , slideIndex , shapeIndex , paragraphIndex , portionIndex , null , null , null , null );
System . out . println ( "The portion font size is \"" + response . getFontHeight () + "\"." );
PHP
use Aspose\Slides\Cloud\Sdk\Api\Configuration ;
use Aspose\Slides\Cloud\Sdk\Api\SlidesApi ;
$config = new Configuration ();
$config -> setAppSid ( "MyClientId" );
$config -> setAppKey ( "MyClientSecret" );
$api = new SlidesApi ( null , $config );
$slideIndex = 1 ;
$shapeIndex = 1 ;
$paragraphIndex = 1 ;
$portionIndex = 1 ;
$response = $api -> getPortionEffective ( "MyPresentation.pptx" , $slideIndex , $shapeIndex , $paragraphIndex , $portionIndex );
print ( "The portion font size is \" " . $response -> getFontHeight () . " \" ." );
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 )
slide_index = 1
shape_index = 1
paragraph_index = 1
portion_index = 1
response = api . get_portion_effective ( "MyPresentation.pptx" , slide_index , shape_index , paragraph_index , portion_index )
print ( f "The portion font height is \" { response.font_height } \" ." )
Node.js
const CloudSdk = require ( "asposeslidescloud" );
const api = new CloudSdk . SlidesApi ( "MyClientId" , "MyClientSecret" );
const slideIndex = 1 ;
const shapeIndex = 1 ;
const paragraphIndex = 1 ;
const portionIndex = 1 ;
const response = await api . getPortionEffective ( "MyPresentation.pptx" , slideIndex , shapeIndex , paragraphIndex , portionIndex );
console . log ( "The portion font height is \"" + response . body . fontHeight + "\"." );
Go
cfg := asposeslidescloud . NewConfiguration ()
cfg . AppSid = "MyClientId"
cfg . AppKey = "MyClientSecret"
api := asposeslidescloud . NewAPIClient ( cfg )
var slideIndex int32 = 1
var shapeIndex int32 = 1
var paragraphIndex int32 = 1
var portionIndex int32 = 1
response , _ , e := api . SlidesApi . GetPortionEffective ( "MyPresentation.pptx" , slideIndex , shapeIndex , paragraphIndex , portionIndex , "" , "" , "" , "" )
if e != nil {
fmt . Printf ( "Error: %v." , e )
return
}
fmt . Printf ( "The portion font height is \"%v\"" , response . GetFontHeight ())
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