PowerPoint to Flash converter
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

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

* 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.dll is placed into the same folder where this source code is
#import "ispring.dll"

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 unitialize 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

Presentation Interface
Settings Interface
Skins Interface
iSpring SDK COM API

  Copyright © 2004-2008 iSpring Solutions, Inc.