Copy SlidesApi api = new SlidesApi ( "MyClientId" , "MyClientSecret" );
Stream file = File . OpenRead ( "sample.pptx" );
Stream response = api . Convert ( file , ExportFormat . Pdf , fontsFolder : "fonts" );
response . CopyTo ( File . Create ( "myPresentation.pdf" ));
Copy SlidesApi api = new SlidesApi ( "MyClientId" , "MyClientSecret" );
byte [] file = Files . readAllBytes ( Paths . get ( "customfont.pptx" ));
File response = api . convert ( file , ExportFormat . PDF , null , null , "customFonts" , null , null );
System . out . println ( "The converted file was saved to " + response . getPath ());
Copy use Aspose \Slides \Cloud \Sdk \Api \Configuration ;
use Aspose \Slides \Cloud \Sdk \Api \SlidesApi ;
use Aspose \Slides \Cloud \Sdk \Model \ExportFormat ;
$config = new Configuration ();
$config -> setAppSid ( "MyClientId" );
$config -> setAppKey ( "MyClientSecret" );
$api = new SlidesApi ( null , $config );
$file = fopen ( "customfont.pptx" , 'r' );
$result = $api -> Convert ( $file , ExportFormat :: PDF , null , null , "customFonts" );
print ( "The converted file was saved to " . $result -> getPathname ());
Copy import asposeslidescloud
from asposeslidescloud.configuration import Configuration
from asposeslidescloud.apis.slides_api import SlidesApi
from asposeslidescloud.models.export_format import ExportFormat
configuration = Configuration ()
configuration . app_sid = 'MyClientId'
configuration . app_key = 'MyClientSecret'
api = SlidesApi ( configuration )
with open ( "customfont.pptx" , 'rb' ) as f :
input_file = f . read ()
result = api . convert ( input_file , ExportFormat . PDF , None , None , "customFonts" )
print ( 'The converted file was saved to ' + result )
Copy const CloudSdk = require ( "asposeslidescloud" );
const fs = require ( "fs" );
const api = new CloudSdk . SlidesApi ( "MyClientId" , "MyClientSecret" );
const file = fs . createReadStream ( "customfont.pptx" );
api . convert ( file , "pdf" , null , null , "customFonts" ). then ( response => {
fs . writeFile ( "customfont.pdf" , response . body , ( err ) => {
if ( err ) throw err ;
});
});
Copy cfg := asposeslidescloud . NewConfiguration ()
cfg . AppSid = "MyClientId"
cfg . AppKey = "MyClientSecret"
api := asposeslidescloud . NewAPIClient ( cfg )
source , e := ioutil . ReadFile ( "customfont.pptx" )
if e != nil {
fmt . Printf ( "Error: %v." , e )
return
}
result , _ , e := api . SlidesApi . Convert ( source , "pdf" , "" , "" , "customFonts" , nil , nil )
if e != nil {
fmt . Printf ( "Error: %v." , e )
return
}
fmt . Printf ( "The converted file was saved to %v." , result . Name ())