Save a Presentation in a Specified Format to Storage Introduction
The following method allows you to covert a PowerPoint presentation located in a Cloud Storage to a desired format and save the result to the storage.
API
Type
Description
Resource
/slides/{name}/{format}
PUT
Converts a presentation located in a storage to a specified format and saves the result to the storage.
SavePresentation
Request Parameters
Name
Type
Location
Required
Description
name
string
path
true
The file name of the presentation.
format
string
path
true
The desired format for the conversion.
outPath
string
query
true
The output file path to save the result in the storage.
options
object
body
false
The format-specific options for the conversion.
password
string
header
false
The password to open the presentation.
folder
string
query
false
The folder path where the presentation is located.
storage
string
query
false
The name of the storage where the presentation is located.
fontsFolder
string
query
false
The path to the storage folder containing external fonts.
slides
string
query
false
The 1-based indices of the slides to be saved. If it is not specified, all slides are saved by default.
To use fontsFolder parameter, you can create storage folders and upload font files to them using Slides Cloud API.
You can convert parts of presentations using the optional slides parameter.
You can specify format-specific options using the options parameter.
If the slides of the presentation are converted to separate images (for example, PNG, JPG, etc.), the result will be a ZIP archive, and the .zip
extension will be added to the output file name.
cURL Examples
Convert MyFolder/example.pptx presentation located in MyStorage storage and save it to MyImages/output.tiff file into the same storage. The document should only contain the slides with indexes 1 and 3 . The slides should contain slide notes in the output file.
SDK Source
Using an SDK (API client) is the quickest way for a developer to speed up the development. An SDK takes care of a lot of low-level details of making requests and handling responses and lets you focus on writing code specific to your particular project. The Aspose.Slides Cloud SDKs can be downloaded from the following page: Available SDKs
SDK Examples
Convert MyFolder/example.pptx presentation located in MyStorage storage and save it to MyImages/output.tiff file into the same storage. The document should only contain the slides with indexes 1 and 3 . The slides should contain slide notes in the output file.
C#
// For complete examples and data files, please go to https://github.com/aspose-Slides-cloud/aspose-Slides-cloud-dotnet
using System.Collections.Generic ;
using Aspose.Slides.Cloud.Sdk ;
using Aspose.Slides.Cloud.Sdk.Model ;
class Test
{
static void Main ()
{
SlidesApi api = new SlidesApi ( "MyClientId" , "MyClientSecret" );
// Slide notes should be added at the bottom of pages.
TiffExportOptions tiffOptions = new TiffExportOptions
{
SlidesLayoutOptions = new NotesCommentsLayoutingOptions
{
NotesPosition = NotesCommentsLayoutingOptions . NotesPositionEnum . BottomFull
}
};
// The TIFF file should only contain the slides with indexes 1 and 3.
List < int > slideIndices = new List < int > { 1 , 3 };
// Save the presentation to TIFF file.
api . SavePresentation ( "example.pptx" , ExportFormat . Tiff , "MyImages/output.tiff" , tiffOptions , slides : slideIndices );
}
}
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 ;
import com.aspose.slides.model.* ;
import java.util.Arrays ;
public class Main {
public static void main ( String [] args ) throws ApiException {
SlidesApi slidesApi = new SlidesApi ( "my_client_id" , "my_client_key" );
// Slide notes should be added at the bottom of pages.
NotesCommentsLayoutingOptions slidesLayoutOptions = new NotesCommentsLayoutingOptions ();
slidesLayoutOptions . setNotesPosition ( NotesCommentsLayoutingOptions . NotesPositionEnum . BOTTOMFULL );
TiffExportOptions tiffOptions = new TiffExportOptions ();
tiffOptions . setSlidesLayoutOptions ( slidesLayoutOptions );
// The TIFF file should only contain the slides with indexes 1 and 3.
ArrayList slideIndices = new ArrayList ( Arrays . asList ( 1 , 3 ));
// Save the presentation to TIFF file.
slidesApi . savePresentation ( "example.pptx" , ExportFormat . TIFF , "MyImages/output.tiff" , tiffOptions , null , "MyFolder" , "MyStorage" , null , slideIndices );
}
}
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 ;
use Aspose\Slides\Cloud\Sdk\Model\TiffExportOptions ;
use Aspose\Slides\Cloud\Sdk\Model\NotesCommentsLayoutingOptions ;
use Aspose\Slides\Cloud\Sdk\Model\ExportFormat ;
$configuration = new Configuration ();
$configuration -> setAppSid ( "my_client_id" );
$configuration -> setAppKey ( "my_client_key" );
$slidesApi = new SlidesApi ( null , $configuration );
// Slide notes should be added at the bottom of pages.
$slidesLayoutOptions = new NotesCommentsLayoutingOptions ();
$slidesLayoutOptions -> setNotesPosition ( "BottomFull" );
$tiffOptions = new TiffExportOptions ();
$tiffOptions -> setSlidesLayoutOptions ( $slidesLayoutOptions );
// The TIFF file should only contain the slides with indexes 1 and 3.
$slideIndices = [ 1 , 3 ];
// Save the presentation to TIFF file.
$slidesApi -> savePresentation ( "example.pptx" , ExportFormat :: TIFF , "MyImages/output.tiff" , $tiffOptions , null , "MyFolder" , "MyStorage" , null , $slideIndices );
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 = "my_client_id"
configuration . app_key = "my_client_key"
slides_api = SlidesApi . new ( configuration )
# Slide notes should be added at the bottom of pages.
slides_layout_options = NotesCommentsLayoutingOptions . new
slides_layout_options . notes_position = "BottomFull"
tiff_options = TiffExportOptions . new
tiff_options . slides_layout_options = slides_layout_options
# The TIFF file should only contain the slides with indexes 1 and 3.
slide_indices = [ 1 , 3 ]
# Save the presentation to TIFF file.
slides_api . save_presentation ( "example.pptx" , ExportFormat :: TIFF , "MyImages/output.tiff" , tiff_options , nil , "MyFolder" , "MyStorage" , nil , slide_indices )
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
from asposeslidescloud.models.tiff_export_options import TiffExportOptions
from asposeslidescloud.models.notes_comments_layouting_options import NotesCommentsLayoutingOptions
from asposeslidescloud.models.export_format import ExportFormat
slides_api = SlidesApi ( None , "my_client_id" , "my_client_key" )
# Slide notes should be added at the bottom of pages.
slides_layout_options = NotesCommentsLayoutingOptions ()
slides_layout_options . notes_position = "BottomFull"
tiff_options = TiffExportOptions ()
tiff_options . slides_layout_options = slides_layout_options
# The TIFF file should only contain the slides with indexes 1 and 3.
slide_indices = [ 1 , 3 ]
# Save the presentation to TIFF file.
slides_api . save_presentation ( "example.pptx" , ExportFormat . TIFF , "MyImages/output.tiff" , tiff_options , None , "MyFolder" , "MyStorage" , None , slide_indices )
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 ( "my_client_id" , "my_client_key" );
// Slide notes should be added at the bottom of pages.
const slidesLayoutOptions = new cloud . NotesCommentsLayoutingOptions ();
slidesLayoutOptions . notesPosition = "BottomFull" ;
const tiffOptions = new cloud . TiffExportOptions ();
tiffOptions . slidesLayoutOptions = slidesLayoutOptions ;
// The TIFF file should only contain the slides with indexes 1 and 3.
const slideIndices = [ 1 , 3 ];
// Save the presentation to TIFF file.
slidesApi . savePresentation ( "example.pptx" , cloud . ExportFormat . Tiff , "MyImages/output.tiff" , tiffOptions , null , "MyFolder" , "MyStorage" , null , slideIndices ). then (() => {
});
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"
#include "asposeslidescloud/model/TiffExportOptions.h"
#include "asposeslidescloud/model/NotesCommentsLayoutingOptions.h"
using namespace asposeslidescloud :: api ;
int main ()
{
auto slidesApi = std :: make_shared < SlidesApi > ( L "my_client_id" , L "my_client_key" );
// Slide notes should be added at the bottom of pages.
auto slidesLayoutOptions = std :: make_shared < NotesCommentsLayoutingOptions > ();
slidesLayoutOptions -> setNotesPosition ( L "BottomFull" );
// Slide notes should be added at the bottom of pages.
auto tiffOptions = std :: make_shared < TiffExportOptions > ();
tiffOptions -> setSlidesLayoutOptions ( slidesLayoutOptions );
// The TIFF file should only contain the slides with indexes 1 and 3.
auto slideIndices = { 1 , 3 };
// Save the presentation to TIFF file.
slidesApi -> savePresentation ( L "example.pptx" , L "tiff" , L "MyImages/output.tiff" , tiffOptions , L "" , L "MyFolder" , L "MyStorage" , L "" , slideIndices ). get ();
return 0 ;
}
Perl
Swift
Go