Giter VIP home page Giter VIP logo

js-ppt's Introduction

ppt

Parser and writer for PowerPoint PPT files. Pure-JS cleanroom implementation from the Microsoft Open Specifications and related documents.

Installation

In nodejs:

npm install ppt 

CLI Tool

The node module ships with a binary ppt that dumps the text content of a PPT presentation. The only argument is the file name:

$ ppt test.ppt
...

Contributing

Due to the precarious nature of the Open Specifications Promise, it is very important to ensure code is cleanroom. Consult CONTRIBUTING.md

License

Please consult the attached LICENSE file for details. All rights not explicitly granted by the Apache 2.0 license are reserved by the Original Author.

It is the opinion of the Original Author that this code conforms to the terms of the Microsoft Open Specifications Promise, falling under the same terms as OpenOffice (which is governed by the Apache License v2). Given the vagaries of the promise, the Original Author makes no legal claim that in fact end users are protected from future actions. It is highly recommended that, for commercial uses, you consult a lawyer before proceeding.

References

OSP-covered specifications:

  • [MS-PPT]: PowerPoint (.ppt) Binary File Format
  • [MS-ODRAW]: Office Drawing Binary File Format

Badges

Build Status

Coverage Status

Analytics

js-ppt's People

Contributors

sheetjsdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

js-ppt's Issues

Possible to expose method that returns string?

I see you are console.loging all the output. It would be nice if there was a way to call, for instance, readFile (or a new function) directly and get a string back and save the trouble of using a child process.

Mistake in README.md

OS Windows 8.1
Instead of npm install ppt should be written npm install ppt -g because otherwise you will have error like. In other words it must be global module.

$ ppt
sh: ppt: command not found

Erroring out

I have a .ppt that's been sitting in the textract repo for a bit that I used for testing graceful error handling. In my case the error was textract does not currently extract files of type [[ application/vnd.ms-powerpoint ]]. Obviously that'll be changing.

https://github.com/dbashford/textract/blob/master/test/files/MxAgCrProd.ppt

This file throws up.

ppt MxAgCrProd.ppt 

/Users/dbashford/.nvm/v0.10.12/lib/node_modules/ppt/ppt.js:623
            if(persist) throw "unexpected second RT_PersistDirectoryAtom";
                        ^
unexpected second RT_PersistDirectoryAtom

Does not parse .pptx at all

c:\Users\...\AppData\Roaming\npm\node_modules\ppt\node_modules\cfb\cfb.js:76
        if(m !== hexstr) throw fld + 'Expected ' + hexstr + ' saw ' + m;
                                                                    ^
Header Signature: Expected d0cf11e0a1b11ae1 saw 504b030414000600

After converting to old .ppt type 2003 year old, throw ne type of error:

$ ppt test2.ppt

c:\Users\...\AppData\Roaming\npm\node_modules\ppt\ppt.js:10
var parsenoop = function(blob, length) { throw new Error("n"); };
                                               ^
Error: n
    at Object.parsenoop [as f] (c:\Users\...\AppData\Roaming\npm\node_mo
dules\ppt\ppt.js:10:48)
    at recordhopper (c:\Users\...\AppData\Roaming\npm\node_modules\ppt\p
pt.js:22:15)
    at Object.parse_OfficeArtClientTextbox [as f] (c:\Users\...\AppData\
Roaming\npm\node_modules\ppt\ppt.js:497:2)
    at recordhopper (c:\Users\...\AppData\Roaming\npm\node_modules\ppt\p
pt.js:22:15)
    at Object.parse_OfficeArtSpContainer [as f] (c:\Users\...\AppData\Ro
aming\npm\node_modules\ppt\ppt.js:65:2)
    at recordhopper (c:\Users\...\AppData\Roaming\npm\node_modules\ppt\p
pt.js:22:15)
    at Object.parse_OfficeArtSpgrContainer [as f] (c:\Users\...\AppData\
Roaming\npm\node_modules\ppt\ppt.js:85:2)
    at recordhopper (c:\Users\...\AppData\Roaming\npm\node_modules\ppt\p
pt.js:22:15)
    at Object.parse_OfficeArtDgContainer [as f] (c:\Users\...\AppData\Ro
aming\npm\node_modules\ppt\ppt.js:51:2)
    at recordhopper (c:\Users\...\AppData\Roaming\npm\node_modules\ppt\p
pt.js:22:15)

Could you help me please with this issue! I really need this module, it is very important for me!

error

    var custream = ppt.find('Current User');
                       ^

TypeError: ppt.find is not a function

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.