Get Default HTML5 Templates Introduction
Presentations are converted to HTML5 using html (Razor) templates. You can use GetHtml5Templates method to download those templates as a ZIP archive. You can use them to create custom templates for your own implementation of HTML5 export.
See the example below.
cURL Example
SDK Source
The Aspose for Cloud SDKs can be downloaded from the following page: Available SDKs
SDK Examples
C#
Copy SlidesApi api = new SlidesApi ( "MyClientId" , "MyClientSecret" );
Stream response = api . GetHtml5Templates ();
using Stream outFile = File . Create ( "Html5Templates.zip" );
response . CopyTo ( outFile );
Java
Copy SlidesApi api = new SlidesApi ( "MyClientId" , "MyClientSecret" );
File response = api . getHtml5Templates ();
System . out . println ( "The templates were saved to " + response . getPath ());
PHP
Copy 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 );
$response = $api -> getHtml5Templates ();
print ( "The templates were saved to " . $response -> getPathname ());
Ruby
Copy configuration = AsposeSlidesCloud :: Configuration . new
configuration . app_sid = "MyClientId"
configuration . app_key = "MyClientSecret"
api = AsposeSlidesCloud :: SlidesApi . new ( configuration )
result = api . get_html5_templates ()
File . binwrite ( "Html5Templates.zip" , result )
Python
Copy 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 )
result = api . get_html5_templates ()
print ( 'The templates were saved to ' + result )
Node.js
Copy const CloudSdk = require ( "asposeslidescloud" );
const fs = require ( "fs" );
const api = new CloudSdk . SlidesApi ( "MyClientId" , "MyClientSecret" );
api . getHtml5Templates (). then ( response => {
fs . writeFile ( "Html5Templates.zip" , response . body , ( err ) => {
if ( err ) throw err ;
});
});
Go
Copy cfg := asposeslidescloud . NewConfiguration ()
cfg . AppSid = "MyClientId"
cfg . AppKey = "MyClientSecret"
api := asposeslidescloud . NewAPIClient ( cfg )
result , _ , e := api . SlidesApi . GetHtml5Templates ()
if e != nil {
fmt . Printf ( "Error: %v." , e )
return
}
fmt . Printf ( "The templates were saved to %v." , result . Name ())
Perl
Copy use File::Slurp ;
use AsposeSlidesCloud::Configuration ;
use AsposeSlidesCloud::SlidesApi ;
my $config = AsposeSlidesCloud::Configuration -> new ();
$config -> { app_sid } = "MyClientId" ;
$config -> { app_key } = "MyClientSecret" ;
my $api = AsposeSlidesCloud::SlidesApi -> new ( config => $config );
my $result = $api -> get_html5_templates ();
my $zip = "Html5Templates.zip" ;
open my $fh , '>' , $zip ;
binmode $fh ;
print $fh $result ;
close $fh ;