Coder Social home page Coder Social logo

felix-indoing / pptxgenjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gitbrent/pptxgenjs

0.0 1.0 0.0 36.76 MB

Create JavaScript PowerPoint Presentations

Home Page: https://gitbrent.github.io/PptxGenJS/

License: MIT License

JavaScript 0.88% TypeScript 99.12%

pptxgenjs's Introduction

PptxGenJS

Create JavaScript PowerPoint Presentations

PptxGenJS Sample Slides


Known Vulnerabilities Dependency Status npm downloads jsdelivr downloads typescripts definitions

Table of Contents

Introduction

This library creates Open Office XML (OOXML) Presentations which are compatible with Microsoft PowerPoint, Apple Keynote, and other applications.

Features

Extensive browser support

  • Create/download presentations on all current desktop & mobile web browsers
  • IE11 is supported via included Promises polyfill

Major PowerPoint object types

  • Slides can include Charts, Images, Media, Shapes, Tables, Text and more.
  • SVG images and YouTube videos are supported when viewed in PowerPoint online/2019+ desktop application

Modern architecture

  • Supports client web browsers, NodeJS, and React/Angular/Electron
  • Export methods return promises
  • Client browsers have only a single dependency: JSZip
  • Easy Angular/React integration (available via npm, cjs or es files)
  • Typescript definitions included

HTML to PowerPoint

  • Includes powerful HTML-to-PowerPoint feature to transform HTML tables into presentations with a single line of code

Live Demo

Use the online demo to create a simple presentation to see how easy it is to use pptxgenjs, or check out the complete demo which showcases every available feature.

Installation

CDN

<!-- Bundle: Easiest to use, supports all browsers -->
<script src="https://cdn.jsdelivr.net/gh/gitbrent/[email protected]/dist/pptxgen.bundle.js"></script>

<!-- Individual files: Add only what's needed to avoid clobbering loaded libraries -->
<script src="https://cdn.jsdelivr.net/gh/gitbrent/[email protected]/libs/jszip.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/gitbrent/[email protected]/dist/pptxgen.min.js"></script>

Download

GitHub Latest Release

<!-- Bundle: Easiest to use, supports all browsers -->
<script src="PptxGenJS/dist/pptxgen.bundle.js"></script>

<!-- Individual files: Add only what's needed to avoid clobbering loaded libraries -->
<script src="PptxGenJS/libs/jszip.min.js"></script>
<script src="PptxGenJS/dist/pptxgen.min.js"></script>
<!-- <script src="PptxGenJS/libs/promise.min.js"></script> IE11 requires Promises polyfill -->

Npm

PptxGenJS NPM Home

npm install pptxgenjs --save
let PptxGenJS = require("pptxgenjs");
let pptx = new PptxGenJS();

Yarn

yarn add pptxgenjs

Additional Builds

  • CommonJS: dist/pptxgen.cjs.js
  • ES Module: dist/pptxgen.es.js

Documentation

Quick Start Guide

PptxGenJS PowerPoint presentations are created via JavaScript by following 4 basic steps:

  1. Create a new Presentation
  2. Add a Slide
  3. Add one or more objects (Tables, Shapes, Images, Text and Media) to the Slide
  4. Save the Presentation
let pptx = new PptxGenJS();

let slide = pptx.addSlide();

let textboxText = "Hello World from PptxGenJS!";
let textboxOpts = { x: 1, y: 1, align: "center", color: "363636", fill: "f1f1f1" };
slide.addText(textboxText, textboxOpts);

pptx.writeFile("Sample Presentation");

That's really all there is to it!


Library API

Full documentation and code examples are available


HTML-to-PowerPoint Feature

Easily convert HTML tables to PowerPoint presentations in a single call.

let pptx = new PptxGenJS();
pptx.tableToSlides("tableElementId");
pptx.writeFile("HTML2PPT.pptx");

Learn more:


Issues / Suggestions

Please file issues or suggestions on the issues page on github, or even better, submit a pull request. Feedback is always welcome!

When reporting issues, please include a code snippet or a link demonstrating the problem. Here is a small jsFiddle that is already configured and uses the latest PptxGenJS code.


Need Help?

Sometimes implementing a new library can be a difficult task and the slightest mistake will keep something from working. We've all been there!

If you are having issues getting a presentation to generate, check out the code in the demos directory. There are demos for both client browsers, node and react that contain working examples of every available library feature.


Contributors

Thank you to everyone for the issues, contributions and suggestions! ❤️

Special Thanks:

PowerPoint shape definitions and some XML code via Officegen Project


License

Copyright © 2015-2020 Brent Ely

MIT

pptxgenjs's People

Contributors

adamlong5 avatar amgault avatar clubajax avatar conbow avatar dzmitrydulko avatar edvinasbartkus avatar ellisgl avatar fdussert avatar gitbrent avatar guipas avatar hilnius avatar ielijose avatar iota-pi avatar jonwardsisu avatar kevinresol avatar krishnatejareddyv avatar kyrrigle avatar loictro avatar mconlin avatar michaelbeaumont avatar mreilaender avatar ntietz avatar pdehaan avatar reimafrgos avatar skalt avatar sleepylemur avatar tpwingo avatar twatson83 avatar vrimar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.