PresentationToPdfConverter class
Plugin for converting the PowerPoint 97-2003 and Microsoft Office Open XML presentations into PDF format.
process(inputPath: string, outputPath: string): Promise
Converts the input presentation to PDF format.
Parameters:
| Name | Type | Description |
|---|---|---|
| inputPath | string | The name of the input presentation file. |
| outputPath | string | The output file name. |
Example
await slidize.PresentationToPdfConverter.process("presentation.pptx", "presentation.pdf");
process(inputPath: string, outputPath: string, options: PdfConverterOptions): Promise
Converts the input presentation to PDF format with custom options.
Parameters:
| Name | Type | Description |
|---|---|---|
| inputPath | string | The name of the input presentation file. |
| outputPath | string | The output file name. |
| options | PdfConverterOptions | PDF converter options. |
Example
const options = new slidize.PdfConverterOptions();
options.setComplianceLevel(slidize.PdfComplianceLevel.PdfA1b);
await slidize.PresentationToPdfConverter.process("presentation.pptx", "presentation.pdf", options);
process(inputBuffer: Buffer): Promise
Converts the input presentation to PDF format.
Parameters:
| Name | Type | Description |
|---|---|---|
| inputBuffer | Buffer | Input presentation as a Buffer. |
Example
const buffer = await fs.readFile("presentation.pptx");
const output = await slidize.PresentationToPdfConverter.process(buffer);
await fs.writeFile("presentation.pdf", output);
process(inputBuffer: Buffer, options: PdfConverterOptions): Promise
Converts the input presentation to PDF format with custom options.
Parameters:
| Name | Type | Description |
|---|---|---|
| inputBuffer | Buffer | Input presentation as a Buffer. |
| options | PdfConverterOptions | PDF converter options. |
Example
const options = new slidize.PdfConverterOptions();
options.setEmbedFullFonts(true);
const buffer = await fs.readFile("presentation.pptx");
const output = await slidize.PresentationToPdfConverter.process(buffer, options);
await fs.writeFile("presentation.pdf", output);