iSpring.PresentationConverter Class

The PresentationConverter Class it a main class of iSpring SDK COM API. It provides presentation conversion methods and properties. In order to start working with iSpring SDK COM an application creates an instance of the PresentationConverter.

Properties

Property

Value Type

Access

Default value

Property description

LastErrorDescription

string

Read only

"

A brief description of the last occurred error

LicenseName

string

Read/Write

"

The license name.
Note: the license name and the license serial number are obtained after iSpring SDK purchase.

LicenseNumber

string

Read/Write

"

The license serial number.
Note: the license name and the license serial number are obtained after iSpring SDK purchase.

Presentation

Presentation Interface

Read only

 

The Presentation Interface providing an access to properties of the opened presentation

PresentationOpened

bool

Read only

 

A boolean value which indicates if the presentation has been opened and is accessible via Presentation property

PresentationVersionSupported

int

Read only

 

A maximum PowerPoint Presentation version which is supported by the presentation converter. The possible values of this property are:
2003 (.ppt, .pps files), 2007 (.pptx, .ppsx files)

Settings

Settings Interface

Read only

 

The Settings Interface providing properties and methods for the adjustment of the presentation conversion parameters

Skins

Skins Interface

Read only

 

The Skins Interface representing a collection of available player skins.

Version

string

Read only

 

A string representation of iSpring SDK version

Activated

Bool

Read only

 

Indicates whether the installed copy of iSpring SDK is activated

ActivationRequestCode

string

Read only

 

Stores license activation request code for this machine.

LicenseActivationCode

string

Read/Write

 

Stores iSpring SDK license activation information. This property is automatically updated when iSpring SDK license is activated using ActivateLicense() method.

Plugins

Plugins Interface

Read only

 

Returns Plugins interface storing information about presentation converter plugins.


Methods

Method

Method description

void CancelConversion(bool deleteGeneratedFiles=true)

Stops the conversion process

void ClosePowerPoint()

Closes Microsoft PowerPoint *

void ClosePresentation()

Closes the opened presentation **

void GenerateFlash(
string folderName="", string fileName="",
OutputMode outputMode=OutputMode.OM_SOLID,
string skin="", Object slideRange=null)

Converts current presentation into Flash movie

void GenerateSolidPresentation(
string filePath="", string skin="",
Object slideRange=null)

Generates a solid Flash presentation file

void GenerateStandaloneSlides(
string folderName="", string filePrefix="",
Object slideRange=null)

Generates a set of standalone Flash slides

void GenerateCompoundPresentation(
string filePath="",
string skin="",
Object slideRange=null)

Generates a compound Flash presentation

void OpenPresentation(Object source)

Opens the specified presentation.
A source parameter can be either a string specifying a presentation file path or PowerPoint.Presentation COM object

bool TestEnvironment()

Checks if all iSpring SDK components and the environment
are installed properly

void ActivateLicense()

Performs online activation of iSpring SDK license. Online license activation process usually takes several seconds and requires active Internet connection.
Before invoking this method the LicenseName and the LicenseNumber properties should contain valid registration name and license key which can be obtained after iSpring SDK license purchase.

void DeactivateLicense()

Performs online license deactivation. When the license is deactivated it can be activated on this or another machine later.

Events

Type

Description

_iSpringEvents.OnStartConversion

Occurs when the presentation conversion is started.

_iSpringEvents.OnStartCollectingData

Occurs when the collecting data about presentation is started.

_iSpringEvents.OnStartProcessingData

Occurs when the presentation procesing is started.

_iSpringEvents.OnStartSwfWriting

Occurs when the output file writing is started.

_iSpringEvents.OnSlideProgressChanged

Occurs when the slide conversion progress is changed.

_iSpringEvents.OnSlideItemProgressChanged

Occurs when the regular slide conversion is finished.

_iSpringEvents.OnStartProcessingVideo

Occurs when the video object processing is stared.

_iSpringEvents.OnVideoProgressChanged

Occurs when the video object processing progress is changed.

_iSpringEvents.OnFinishProcessingVideo

Occurs when the video object processing is finished.

_iSpringEvents.OnFinishCollectingData

Occurs when the collecting data about presentation is finished.

_iSpringEvents.OnFinishProcessingData

Occurs when the presentation data processing is finished.

_iSpringEvents.OnFinishSwfWriting

Occurs when the swf file writing is is finished.

_iSpringEvents.OnFinishConversion

Occurs when the presentation conversion is finished.

_iSpringEvents.OnIdle

Occurs constantly during during conversation process. This event can be used for updating user interface.

* ClosePowerPoint method is deprecated since PowerPoint application is closed automatically when PresentationConverter object is deleted.

** ClosePresentation method is deprecated. Use the Close method of the Presentation Interface instead.

Samples

The following samples illustrate a way of the PresentationConverter Object creation in different programming languages.

Language

Sample code

VB Script

Set fs = CreateObject("iSpring.PresentationConverter")
          

C#

iSpring.PresentationConverter pc = new iSpring.PresentationConverter();
          

Visual Basic .NET

Dim pc as New iSpring.PresentationConverter
         

Visual Basic

Dim pc as New iSpring.PresentationConverter
          

C++ (VC++/ATL)

#include <atlbase.h>

// assume that ispring.tlb is located in the same folder
#import "iSpringSDK.tlb"

int main()
{
    // we must initialize COM library before the creation of any COM objects
    CoInitialize(NULL);
    {
        // _PresentationConverter is the default interface of PresentationConverter Object
        CComPtr<iSpring::_PresentationConverter> pConverter;

        // Create the instance of Presentation converter
        HRESULT hr = pConverter.CoCreateInstance(__uuidof(iSpring::PresentationConverter));
        ATLASSERT(SUCCEEDED(hr));

        // CComPtr is a smart pointer. It will automatically call Release() method
        // on pConverter COM object after leaving the scope of this block
    }// <- pConverter object instance will be released here

    // we must uninitialize COM library before exit our application
    CoUninitialize();
    return 0;
}

PHP

<?php
$pc = new COM("iSpring.PresentationConverter")

// access PresentationConverter methods and properties
// ...

// it is necessary to set the presentation converter object to null
// when you don't need it anymore. Otherwise a runtime error will occur.
$pc = null;
?>
         

See also

_iSpringEvents Interface
Presentation Interface
Settings Interface
Skins Interface
iSpring SDK COM API