From a7ef233e59da3be00399e5628b441272e2bf5de7 Mon Sep 17 00:00:00 2001 From: GitBrent Date: Wed, 15 Feb 2017 22:57:25 -0600 Subject: [PATCH] Updating for v1.2.0 --- CHANGELOG.md | 7 ++++++- README.md | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df15d7bf2..4424c88f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## [v1.2.0](https://github.com/gitbrent/pptxgenjs/tree/v1.2.0) (2017-02-13) +## [v1.2.0](https://github.com/gitbrent/pptxgenjs/tree/v1.2.0) (2017-02-15) [Full Changelog](https://github.com/gitbrent/pptxgenjs/compare/v1.1.6...v1.2.0) **Implemented Enhancements:** @@ -11,6 +11,11 @@ - Table cell marginPt should allow zero and take TRBL array [\#32](https://github.com/gitbrent/PptxGenJS/issues/32) ([ellisgl](https://github.com/ellisgl)) - Formatting rules do not apply to string with '\n' in `addText()` [\#34](https://github.com/gitbrent/PptxGenJS/issues/34) ([itskun](https://github.com/itskun)) - Node module appends to last generated PPT on `save()` [\#38](https://github.com/gitbrent/PptxGenJS/issues/38) ([alexanderpepper](https://github.com/alexanderpepper)) +- callback support for save method [\#40](https://github.com/gitbrent/PptxGenJS/issues/40) ([ellisgl](https://github.com/ellisgl)) +- Callback for save method (nodejs only) [\#41](https://github.com/gitbrent/PptxGenJS/pull/41) ([ellisgl](https://github.com/ellisgl)) + +**Fixed Bugs:** +- Table formatting bug in `addTable()` [\#36](https://github.com/gitbrent/PptxGenJS/issues/36) ([itskun](https://github.com/itskun)) ## [v1.1.6](https://github.com/gitbrent/pptxgenjs/tree/v1.1.6) (2017-01-19) [Full Changelog](https://github.com/gitbrent/pptxgenjs/compare/v1.1.5...v1.1.6) diff --git a/README.md b/README.md index cfff536b9..c253b0f00 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ an HTML Table across one or more Slides with a single command. - [Adding Media (Audio/Video/YouTube)](#adding-media-audiovideoyoutube) - [Media Options](#media-options) - [Media Examples](#media-examples) + - [Saving Presentations](#saving-presentations) - [Master Slides and Corporate Branding](#master-slides-and-corporate-branding) - [Slide Masters](#slide-masters) - [Slide Master Examples](#slide-master-examples) @@ -510,6 +511,27 @@ slide.addMedia({ type:'online', link:'https://www.youtube.com/embed/Dph6ynRVyUc' pptx.save('Demo-Media'); ``` +## Saving Presentations + +Client Browser: +* Simply provide a filename + +```javascript +pptx.save('Demo-Media'); +``` + +Node.js: +* Node can accept a callback function that will return the filename + +```javascript +// A: File will be saved to the local working directory (`__dirname`) +pptx.save('Node_Demo'); +// B: Inline callback function +pptx.save('Node_Demo', function(filename){ console.log('Created: '+filename); } ); +// C: Predefined callback function +pptx.save('Node_Demo', saveCallback ); +``` + ************************************************************************************************** # Master Slides and Corporate Branding