- 
                Notifications
    You must be signed in to change notification settings 
- Fork 772
Version 3.0 Migration Guide
        Brent Ely edited this page Feb 19, 2020 
        ·
        11 revisions
      
    - There are major breaking changes in Version 3.0
- Existing applications will not function unless you update your code!
The save() method has been removed.
Use one of these new methods instead - all of them return a Promise.
| Save Methods | Description | 
|---|---|
| writeFile(name) | browser-based apps: downloads file. node apps: uses fsto write to the local file system | 
| write(type) | returns the presentation in selected type (arraybuffer, blob, base64, and more) | 
| stream() | returns the presentation as a stream | 
| Old Method Name | New Method Name | 
|---|---|
| addNewSlide() | addSlide() | 
| addSlidesForTable() | tableToSlides() | 
PptxGenJS now exposes properties using ES5 JavaScript getters/setters.
| Old Method Name | New Method Name | 
|---|---|
| pptx.setAuthor('Brent Ely') | pptx.author = 'Brent Ely' | 
| pptx.setCompany('STAR Labs') | pptx.company = 'STAR Labs' | 
| pptx.setRevision('15') | pptx.revision = '15' | 
| pptx.setSubject('Report') | pptx.subject = 'Report' | 
| pptx.setTitle('My Presentation') | pptx.title = 'My Presentation' | 
| pptx.setRTL(true) | pptx.rtlMode = true | 
| pptx.setLayout('LAYOUT_4x3') | pptx.layout = 'LAYOUT_4x3' | 
Create custom sized layouts (e.g.: A3)
pptx.defineLayout({ name:'A3', width:16.5, height:11.7 });Using custom layouts
pptx.layout = 'A3';| Old Option | New Option | 
|---|---|
| {align: 'middle'} | {align: 'center'} | 
| Old Option | New Option | 
|---|---|
| {border: 'none'} | {border: {type:'none'}} | 
| {shadow: 'none'} | {shadow: {type:'none'}} | 
Completely updated integration for Angular, Electron, React, etc.
- jQuery is no longer required
- JSZip is the sole requirement
- PptxGenJS/dist now has 3 versions of the library: min, es, and cjs
- The library is now written in TypeScript
- All new, updated definitions (generated by build tools!)