From 1f6bfd10f8527ba290149f26210adcb278c70ffd Mon Sep 17 00:00:00 2001 From: Michal Kacerovsky Date: Wed, 16 Aug 2017 12:10:24 +0200 Subject: [PATCH] Readme update --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b7d670966..3fc2527b7 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ Quickly and easily create PowerPoint presentations with a few simple JavaScript - [Saving a Presentation](#saving-a-presentation) - [Client Browser](#client-browser) - [Node.js](#nodejs-1) + - [Specific output type](#specific-output-type) - [Presentations: Adding Objects](#presentations-adding-objects) - [Adding Charts](#adding-charts) - [Chart Types](#chart-types) @@ -287,7 +288,17 @@ pptx.save( 'Node_Demo', saveCallback ); pptx.save( 'http', streamCallback ); ``` -Saving multiple Presentations: +### Specific output type +When a save callback function is specified (no matter whether on a client or in Node), an extra parametr can be passed – `outputType`. +This parameter accepts any value of [the JSzip supported formats](https://stuk.github.io/jszip/documentation/api_jszip/generate_async.html). For example: + +```javascript +pptx.save( 'whatever', function(content) { + console.log(content); +}, 'base64'); +``` + +Saving multiple Presentations: * In order to generate a new, unique Presentation just create a new instance of the library then add objects and save as normal. ```javascript