Table of Contents

PresentationToHtmlConverter class

Plugin for converting the PowerPoint 97-2003 and Microsoft Office Open XML presentations into HTML format.

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

Converts the input presentation to HTML format.

Parameters:

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

Example

await slidize.PresentationToHtmlConverter.process("presentation.pptx", "presentation.html");

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

Converts the input presentation to HTML format with custom options.

Parameters:

Name Type Description
inputPath string The name of the input presentation file.
outputPath string The output file name.
options HtmlConverterOptions HTML converter options.

Example

const options = new slidize.HtmlConverterOptions();
options.setPicturesCompression(slidize.PicturesCompressionLevel.Dpi150);
await slidize.PresentationToHtmlConverter.process("presentation.pptx", "presentation.html", options);

process(inputBuffer: Buffer): Promise

Converts the input presentation to HTML format.

Parameters:

Name Type Description
inputBuffer Buffer Input presentation as a Buffer.

Example

const buffer = await fs.readFile("presentation.pptx");
const output = await slidize.PresentationToHtmlConverter.process(buffer);
await fs.writeFile("presentation.html", output);

process(inputBuffer: Buffer, options: HtmlConverterOptions): Promise

Converts the input presentation to HTML format with custom options.

Parameters:

Name Type Description
inputBuffer Buffer Input presentation as a Buffer.
options HtmlConverterOptions HTML converter options.

Example

const options = new slidize.HtmlConverterOptions();
options.setJpegQuality(85);
const buffer = await fs.readFile("presentation.pptx");
const output = await slidize.PresentationToHtmlConverter.process(buffer, options);
await fs.writeFile("presentation.html", output);