Table of Contents

PresentationConverter class

Plugin for converting the PowerPoint 97-2003 and Microsoft Office Open XML presentations into various presentation formats.

process(inputPath: string, outputPath: string): Promise

Converts the input presentation using the output file extension to determine the required convert format.

Parameters:

Name Type Description
inputPath string The name of the input presentation file.
outputPath string The name of the output presentation file.

Example

await slidize.PresentationConverter.process("presentation.ppt", "presentation.pptx");

process(inputPath: string, outputPath: string, convertFormat: int): Promise

Converts the input presentation to a file with the specified format.

Parameters:

Name Type Description
inputPath string The name of the input presentation file.
outputPath string The name of the output presentation file.
convertFormat number The format to which the presentation should be converted (see ConvertFormat).

Example

await slidize.PresentationConverter.process("presentation.pptx", "presentation.odp", slidize.ConvertFormat.Odp);

process(inputBuffer: Buffer, convertFormat: int): Promise

Converts the input presentation to the specified format.

Parameters:

Name Type Description
inputBuffer Buffer Input presentation as a Buffer.
convertFormat number The format to which the presentation should be converted (see ConvertFormat).

Example

const inputStream = await fs.readFile("presentation.ppt");
const output = await slidize.PresentationConverter.process(inputStream, slidize.ConvertFormat.Pptx);
await fs.writeFile("presentation.pptx", output);